为什么我的zend应用程序在我的localhost上运行但在我的服务器上使用'Zend_Loader_PluginLoader_Exception'失败?

时间:2011-12-08 12:27:14

标签: zend-framework

我创建了一个zend应用程序,它在localhost上运行正常,但我无法在服务器上运行,我收到此错误:

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message
'Plugin by name 'ServerURL' was not found in the registry; 

used paths: Proprio_View_Helper_: Proprio/View/Helper/
Zend_View_Helper_:
Zend/View/Helper/:/home2/t1002046/application/views/helpers/' in /home2/t1002046/library/Zend/Loader/PluginLoader.php:412 

Stack trace:
#0 /home2/t1002046/library/Zend/View/Abstract.php(1182): 
    Zend_Loader_PluginLoader->load('ServerURL') 
#1 /home2/t1002046/library/Zend/View/Abstract.php(618): 
    Zend_View_Abstract->_getPlugin('helper', 'serverURL') 
#2 /home2/t1002046/library/Zend/View/Abstract.php(344):
    Zend_View_Abstract->getHelper('serverURL') 
#3 /home2/t1002046/application/layouts/scripts/layout.phtml(6): 
    Zend_View_Abstract->__call('serverURL', Array) 
#4 /home2/t1002046/application/layouts/scripts/layout.phtml(6): 
    Zend_View->serverURL() 
#5 /home2/t1002046/library/Zend/View.php(108):
    include('/home2/t1002046...') 
#6 /home2/t1002046/library/Zend/View/Abstract.php(888):
    Zend_View->_run('/home2/t1002046...') 
#7 /home in /home2/t1002046/library/Zend/Controller/Plugin/Broker.php on line 336

我不知道我是不是在我的application.ini上加载了一些重要的东西,一旦它在localhost上工作正常,但是错误说的是'按名称插件'ServerURL',实际上我现在不知道什么是错的或者如何加载ServerURL。这个ServerURL位于我的layout.phtml:

<base href="<?php echo $this->serverURL() . $this->baseURL()?>/" />

关注我的application.ini

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"

resources.locale.default = "pt_BR"
resources.locale.force = 1

autoloadernamespaces[] = "Proprio"

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.displayExceptions = 0
resources.frontController.plugins[ ] = "Proprio_Controller_Plugin_Acl"

resources.view.helperPath.Proprio_View_Helper = "Proprio/View/Helper"

; Layout
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

; Banco de Dados
resources.db.adapter = "PDO_Mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = ""
resources.db.params.charset = "utf8"

; habilita modules, desta forma (apenas =) o ZF dá o new em modules
resources.modules = 

;cache
resources.cachemanager.default.frontend.options.lifetime = 7800
resources.cachemanager.default.backend.options.cache_dir = APPLICATION_PATH "/../data/cache"

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

1 个答案:

答案 0 :(得分:0)

如果您的localhost是Windows而您的服务器是Linux,则常见的问题是linux的文件和文件夹名称区分大小写。请检查您的文件名和类名是否与文件夹结构相对应。希望有所帮助