2013-07-24 46 views
2

我對Zend有一個奇怪的問題。它在localhost和開發機器上運行良好。但生產它給指定的錯誤無效控制器(收據)zend framewrok錯誤生產中指定的控制器無效

Request Parameters: 
array (
    'controller' => 'receipt', 
    'action' => 'create', 
    'module' => 'default', 
) 

我的應用程序的.ini是

[production] 
phpSettings.display_startup_errors = 0 
phpSettings.display_errors = 0 
includePaths.library = APPLICATION_PATH "/../library" 
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" 
bootstrap.class = "Bootstrap" 
appnamespace = "Application" 
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" 
resources.frontController.params.displayExceptions = 0 
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" 
resources.modules[] = "" 
resources.frontController.moduleControllerDirectoryName = "controllers" 
resources.frontController.params.prefixDefaultModule = "" 

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" 
resources.view[] = 

[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 

任何幫助,將最有可能的情況下,敏感的問題讚賞

+0

你確定帶有控制器代碼的文件是上傳的嗎?你是否改變了生產機器上的目錄結構? – zavg

回答

2

。確保控制器的文件名以大寫字母(ReceiptController.php)開頭,目錄名稱爲小寫字母(模塊,控制器)。

+0

啊很棒..它是控制器文件名稱不是大寫。不知道它如何在本地工作。 –

0

嘗試刪除該行:

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" 

如果還是不行,請嘗試以下(爲多個模塊只)我CONFIGS:

resources.modules[] = "" 
resources.frontController.params.prefixDefaultModule = "" 
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" 
resources.frontController.moduleControllerDirectoryName = "controllers" 
resources.frontController.defaultModule = "default" 
resources.frontController.defaultControllerName = "index" 
resources.frontController.defaultAction = "index" 
resources.frontController.env = APPLICATION_ENV 

對不起,我說英語不好

相關問題