You must rely on the resource loader / load to get your frontController, omit _initController()
To get your controller from the buffer, you can do $this->bootstrap('frontController'); and $frontController = $this->getResource('frontController'); . This way it will use the configuration in your application.ini application.
Regarding the bug, I think your problem might be the missing slash: APPLICATION_PATH . '/controllers/' APPLICATION_PATH . '/controllers/' , which you manually install in bootstrap. Your APPLICATION_PATH may not end with / , so it cannot find applicationcontrollers/ErrorController.php
Alternatively, your _initRoute() function can be replaced with the following application.ini:
resources.router.routes.default.type = "Zend_Controller_Router_Route" resources.router.routes.default.route = ":controller/:action/*" resources.router.routes.default.defaults.controller = "index" resources.router.routes.default.defaults.action = "index" resources.router.routes.default.defaults.module = "default"
This leaves the only part of your bootstrap that wants the run() controller to function try{}catch{} , which could be moved to your index.php .
gnarf source share