2011-10-01 24 views
1

我認爲它是一個簡單的路徑問題 - 但我花了最後2個小時嘗試各種組合,但無法解決此問題。該代碼在我的Windows系統上工作正常,但是當我將它上傳到我在Linux操作系統上的託管站點時 - 它找不到ACL文件。Zend ACL類未被FrontController發現

這是路徑是如何在我的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 

感謝您的時間 欣賞它

+0

是庫文件夾中的Ed文件夾?那個保存在哪裏?從我看到的一切看起來都很不錯。 – drew010

+0

是的Ed文件夾和Zend文件夾是在庫內 - 奇怪的是它在我開發的Windows環境中工作 - 當我上傳到託管站點 - 它找不到它 – Gublooo

+1

你檢查文件名嗎?請記住,linux是區分大小寫的 - 也許你用小寫命名文件/目錄? – Fge

回答

0

記住* IX是所有情況下使用的文件名大小寫。因此目錄必須以大寫字母開頭。如果他們不這樣做,Windows不會抱怨 - 但Linux會。