简体   繁体   中英

Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching “frontController” not found

This is my first program in Zend, i have create a project with zf create project abc. On running the program i get following error " Fatal error: Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching "frontController" not found' in /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php:694 Stack trace: #0 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(626): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('frontController') #1 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(586): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #2 /usr/share/php/libzend-framework-php/Zend/Application.php(355): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #3 /var/www/zuund/public/index.php(25): Zend_Application->bootstrap() #4 {main} thrown in /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php on line 694"

application.ini file content is

[production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    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

[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

Waiting for reply

have you created any controller and view scripts ?? it will first search for index controller in application/controller , looks like you have not created any controller, you are just running your program after creating,

so just go through the zend's skeleton application first and understand how it works, that will be very helpfull to you ,

here's the link ,

http://framework.zend.com/manual/1.12/en/learning.quickstart.html

and another example with total code and explanation,

http://akrabat.com/zend-framework-tutorial/ ....

hope it helps..

Thanks a lot! Your tip (in the app.ini) solved my problem.

Here is my code:

;application/configs/application.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.defaultControllerName = "view"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view[]="" 

[staging : production]
;resources.view.encoding = [] ="utf-8"
[testing : production]
phpSettings.display_startup_errors = 1

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM