0

我的 Zend Framework 项目中有一些使用自定义视图助手的自定义表单元素。它们被加载并在开发机器上正常工作,但是当我将项目移动到我的 EC2 服务器时,它们没有被加载。

来自 application.ini:

resources.view.helperPath.Custom_View_Helper_ = APPLICATION_PATH "/../library/Custom/View/Helper/"

服务器返回的错误:

Warning: Exception caught by form: Plugin by name 'Multiselect' was not found in the registry; 
used paths: 
Application_Views_Helpers_Fields_: /home/user/hippo/application/views/helpers/fields/ 
Application_Views_Helpers_: /home/user/hippo/application/views/helpers/ 
Custom_View_Helper_: /home/user/hippo/application/../library/Custom/View/Helper/ 
Zend_View_Helper_: Zend/View/Helper/:/home/user/hippo/application/views/helpers/ Stack 
Trace: 
#0 /home/user/hippo/library/Zend/View/Abstract.php(1182): Zend_Loader_PluginLoader->load('Multiselect') 
#1 /home/user/hippo/library/Zend/View/Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'multiselect') 
#2 /home/user/hippo/library/Zend/Form/Decorator/ViewHelper.php(241): Zend_View_Abstract->getHelper('multiselect') 
#3 /home/user/hippo/library/Zend/Form/Element.php(2043): Zend_Form_Decorator_ViewHelper->render('') 
#4 /home/user/hippo/library/Zend/Form/Decorator/FormElements.php(111): Zend_Form_Element->render() 
#5 /home/user/hippo/library/Zend/ in /home/user/hippo/library/Zend/Form.php on line 2925

什么可能导致它在我的开发机器上工作但在 EC2 上不工作?

4

1 回答 1

0

我解决了这个问题。我的开发机器是 Mac,EC2 运行的是 Linux。我必须更改public $helper='multiselect'为,public $helper='multiSelect'以便搜索文件名MultiSelect.php而不是Multiselect.php搜索视图助手时。

于 2013-01-25T23:04:43.887 回答