Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught exception 'Zend_Controller_Dispatcher_Exception'

I am getting the following error on zend framework:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php:245 
Stack trace: 
#0 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(946):Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))  
#1 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch()  
#2 F:\wamp\www\helloworld\web_root\index.php(10): Zend_Controller_Front::run('../application/...')  
#3 {main} thrown in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php on line 245

What is causing this, and how can I fix it?

like image 477
saurabh Avatar asked Jan 25 '10 06:01

saurabh


2 Answers

In index.php file write

$frontController->setParam('useDefaultControllerAlways', true);
$frontController->dispatch();

Alternatively you can write following line in [production] section of application.ini file:

resources.frontController.params.useDefaultControllerAlways = 1

like image 170
Shahid Avatar answered Oct 22 '22 11:10

Shahid


You have probably (re)moved/edited the ErrorController.php file, which can be found in

/application/controllers/

An other possibility is that you have configured your application to look after an not-existing Error controller.

like image 6
user228395 Avatar answered Oct 22 '22 11:10

user228395