Tariq G
Tariq G

Reputation: 356

zend framewrok error Invalid controller specified on production

I have strange issue with Zend. its working fine on localhost and development machine. but on production it gives error Invalid controller specified (receipt)

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

my application .ini is

[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

any help would be appreciated

Upvotes: 2

Views: 191

Answers (2)

Thanh Nguyen
Thanh Nguyen

Reputation: 5352

try delete this line:

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"

If it still doesn't work, try my configs below (for multiple modules only):

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

I'm sorry i speak English not well

Upvotes: 0

Pieter
Pieter

Reputation: 1774

Most likely a case-sensitivity issue. Make sure the filename of the controller begins with a capital letter (ReceiptController.php) and the directory names are lowercase (modules, controllers).

Upvotes: 2

Related Questions