I am using Zend Framework RC 1 and I am trying to get modules working correctly, this is my directory structure:
Quote:
/
--/application
---/modules
----/admin
------/controllers
--------IndexController.php
------/models
------/views
----/default
------/controllers
--------IndexController.php
------/models
------/views
--/library
--/public
/.htaccess
/index.php
|
in my index.php I have the following set up:
Code:
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Registry');
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Db_Table');
$controller = Zend_Controller_Front::getInstance();
$controller->addModuleDirectory('./application/modules');
$controller->dispatch();
When i browse to
http://host/ I do get the correct output from default/controllers/Indexcontroller's indexAction function, however, when I browse to
http://host/admin/ I get nothing
Also, both are giving me the following error (it appears below my echo statement in the default indexcontroller):
Quote:
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in
D:\Work\LR\library\Zend\Controller\Dispatcher\Stan dard.php:189 Stack trace:
#0 D:\Work\LR\library\Zend\Controller\Front.php(889):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 D:\Work\LR\index.php(50):
Zend_Controller_Front->dispatch() #2 {main} thrown in D:\Work\LR\library\Zend\Controller\Dispatcher\Stan dard.php on line 189
|