2011-08-24 154 views
0

我試圖用PHP/Zend實現用戶登錄。按照下面的例子: https://github.com/ezimuel/Authentication-and-authorization-with-ZF.git致命錯誤 - Login_Plugin_SecurityCheck未找到

http://localhost/

Warning: include_once(Login/Plugin/SecurityCheck.php) [function.include-once]: failed to open stream: No such file or directory in /Library/WebServer/Documents/xxxxx/library/Zend/Loader.php on line 146

Warning: include_once() [function.include]: Failed opening 'Login/Plugin/SecurityCheck.php' for inclusion (include_path='/Library/WebServer/Documents/xxxxx/application/../library:/Library/WebServer/Documents/xxxxx/library:/Library/WebServer/Documents/xxxxx/application/modules/login/library:.:/usr/lib/php') in /Library/WebServer/Documents/xxxxx/library/Zend/Loader.php on line 146

Fatal error: Class 'Login_Plugin_SecurityCheck' not found in /Library/WebServer/Documents/xxxxx/library/Zend/Application/Resource/Frontcontroller.php on line 117

我安裝項目由以下了Zend快速入門教程時,我得到了下面的錯誤,所以我的application.ini文件略有不同。我猜這是一個應用程序無法找到某些文件的簡單情況?

回答

0

有你在application.ini了這些行:

resources.frontController.defaultModule = "login" 
resources.frontController.params.prefixDefaultModule = "1" 
resources.modules[]= 
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" 
resources.frontController.plugins[] = "Login_Plugin_SecurityCheck" 

而且,我注意到該插件在配置爲Login_Plugin_SecurityCheck規定,但登錄模塊中,文件夾是plugins,不plugin

+0

是的。這是我的.ini文件的生產部分。出於興趣,這些也應該在我的開發部分嗎? [製作] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH 「/../library」 bootstrap.path = APPLICATION_PATH 「/Bootstrap.php」 bootstrap.class = 「自舉」 appnamespace = 「應用程序」 resources.frontController.controllerDirectory = APPLICATION_PATH 「/控制器」 resources.frontController.params.displayExceptions = 0 resources.layout.layoutPath = APPLICATION_PATH 「/佈局/腳本/」 resources.view [] = – TLD

+0

resources.db.adapter =「PDO_SQLITE」 resources.db.params.dbname = APPLICATION_PATH「/。 ./data/db/xxxxx.db」 autoloaderNamespaces [] = 「Login_」 resources.frontController.defaultModule = 「登錄」 resources.frontController.params.prefixDefaultModule = 「1」 resources.modules [] = 資源好了,嘗試在'application/modules/login /'中將'plugins'文件夾更改爲'plugin' – TLD

+0

/模塊/登錄/插件到/應用程序/模塊/登錄/插件,但我得到同樣的錯誤。猜測它找不到SecurityCheck.php文件?我不是在/application/modules/login/bootstrap.php中調用bootstrap嗎? – ChrisA