bryantms Posted October 19, 2008 Share Posted October 19, 2008 Hi all - I'm working through the book Practical Web 2.0 Applications with PHP and have run into an issue. I am trying to install the main Controllers to handle the site. I have tried to implement an IndexController as follows: IndexController.php <?php class IndexController extends CustomControllerAction { public function indexAction() { } } ?> This extends CustomControllerAction.php <?php class CustomControllerAction extends Zend_Controller_Action { public $db; function init() { $this->db = Zend_Registry::get('db'); } } ?> I'll also include .htaccess: RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 And I'll include settings.ini: [development] database.type = pdo_mysql database.hostname = localhost database.username = phpweb20 database.password = myPassword (obviously changed) database.database = phpweb20 paths.base = /var/www/phpweb20 paths.data = /var/www/phpweb20/data paths.templates = /var/www/phpweb20/templates logging.file = /var/www/phpweb20/data/logs/debug.log The error I am receiving when I implement all of these is as follows: Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /var/www/phpweb20/include/Zend/Controller/Dispatcher/Standard.php:241 Stack trace: #0 /var/www/phpweb20/include/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /var/www/phpweb20/htdocs/index.php(18): Zend_Controller_Front->dispatch() #2 {main} thrown in /var/www/phpweb20/include/Zend/Controller/Dispatcher/Standard.php on line 241 Has anyone experienced similar problems? Does anyone have any idea on how to solve this? Any help is appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/129032-zend-framework-zend_controller_dispatch_exception-issue/ Share on other sites More sharing options...
JasonDFR Posted November 11, 2008 Share Posted November 11, 2008 I am having the EXACT same problem. I am on Windows XP using Xampp. Did you find the solution? Please let me know. Thanks a lot! Jason Link to comment https://forums.phpfreaks.com/topic/129032-zend-framework-zend_controller_dispatch_exception-issue/#findComment-687631 Share on other sites More sharing options...
Mchl Posted November 11, 2008 Share Posted November 11, 2008 Invalid controller specified (error) So, do you have a controller for error pages yet? Link to comment https://forums.phpfreaks.com/topic/129032-zend-framework-zend_controller_dispatch_exception-issue/#findComment-687632 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.