FrontController 未找到 Zend ACL 类
我认为这是一个简单的路径问题 - 但我花了过去 2 个小时尝试各种组合,但无法解决这个问题。该代码在我的 Windows 系统上运行良好,但是当我将其上传到 Linux 操作系统上的托管站点时,它找不到 ACL 文件。
这是在我的index.php中定义路径的方式
// Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), get_include_path(), )));
这是application.ini中的行
resources.frontController.plugins.acl = "Ed_Controller_Plugin_Acl"
这是bootstrap.php相关代码
protected function _initAutoload() { ....... Zend_Loader_Autoloader::getInstance()->registerNamespace('Ed_'); ....... }
这些是我在linux系统上遇到的错误并且ACL不起作用
[Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning: include_once(Ed/Controller/Plugin/Acl.php): failed to open stream: No such file or directory in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146 [Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning: include_once(): Failed opening 'Ed/Controller/Plugin/Acl.php' for inclusion (include_path='/home/webadmin/dezyre.com/application/../library:/home/webadmin/dezyre.com/library:.:/usr/share/pear:/usr/share/php') in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146 [Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Fatal error: Class 'Ed_Controller_Plugin_Acl' not found in /home/webadmin/dezyre.com/library/Zend/Application/Resource/Frontcontroller.php on line 117
感谢您的时间 欣赏它
I think its a simple path issue here - but I've spent last 2 hours trying various combinations but not able to resolve this. The code is working fine on my windows system but when I upload it to my hosting site on linux OS - it doesn't find the ACL file.
This is how the paths are defined in my index.php
// Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), get_include_path(), )));
This is the line in application.ini
resources.frontController.plugins.acl = "Ed_Controller_Plugin_Acl"
This is the bootstrap.php relevant code
protected function _initAutoload() { ....... Zend_Loader_Autoloader::getInstance()->registerNamespace('Ed_'); ....... }
These are the errors I am getting on the linux system and the ACL doesn't work
[Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning: include_once(Ed/Controller/Plugin/Acl.php): failed to open stream: No such file or directory in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146 [Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning: include_once(): Failed opening 'Ed/Controller/Plugin/Acl.php' for inclusion (include_path='/home/webadmin/dezyre.com/application/../library:/home/webadmin/dezyre.com/library:.:/usr/share/pear:/usr/share/php') in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146 [Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Fatal error: Class 'Ed_Controller_Plugin_Acl' not found in /home/webadmin/dezyre.com/library/Zend/Application/Resource/Frontcontroller.php on line 117
Thanks for your time
Appreciate it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请记住,*ix 文件名区分大小写。因此目录必须以大写字母开头。如果不这样做,Windows 不会抱怨,但 Linux 会抱怨。
Remember that *ix is all case sensitive with file names. Therefore directories must start with in uppercase. If they don't, Windows won't complain - but Linux will.