title: Trouble getting a modular Zend Framework project started
body: <p>I'm trying to set up a modular Zend Framework project with frontend and backend modules, but I just can't get it working. When I visit my <code>public</code> directory in a web browser, I get this error message:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception'
    with message 'Invalid controller specified (error)' in
    /usr/share/ZendFrameworkCli/library/Zend/Controller/Dispatcher/Standard.php:248
    Stack trace: #0
    /usr/share/ZendFrameworkCli/library/Zend/Controller/Front.php(954):
    Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
    Object(Zend_Controller_Response_Http)) #1
    /usr/share/ZendFrameworkCli/library/Zend/Application/Bootstrap/Bootstrap.php(97):
    Zend_Controller_Front->dispatch() #2
    /usr/share/ZendFrameworkCli/library/Zend/Application.php(366):
    Zend_Application_Bootstrap_Bootstrap->run() #3
    /Users/Martin/Dropbox/Repositories/realestatecms/public/index.php(25):
    Zend_Application->run() #4 {main} Next exception
    'Zend_Controller_Exception' with message 'Invalid controller specified
    (error)#0
    /usr/share/ZendFrameworkCli/library/Zend/Controller/Front.php(954):
    Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
    Object(Zend_Controller_Response_Http)) in
    /usr/share/ZendFrameworkCli/library/Zend/Controller/Plugin/Broker.php
    on line 336</p>
  </blockquote>
  
  <p>I have created the two modules using the Zend Framework command line tool, and those two <code>module</code> directories have <code>Bootstrap.php</code> with two classes in called <code>Frontend_Bootstrap</code> and <code>Backend_Bootstrap</code> respectively.</p>
  
  <p>My <code>application.ini</code> file looks as follows:</p>
  
  <pre><code>[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 "/frontend/controllers"
  resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  resources.frontController.params.displayExceptions = 0
  resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
  ...
  </code></pre>
  
  <p>What have I done wrong? How do I get my <code>Frontend_IndexController()</code> to run when I visit <a href="http://example.com/public" rel="nofollow">http://example.com/public</a> in my browser?</p>
  
  <p><strong>EDIT:</strong> If I update my configuration file with the lines as per Ivan's answer, I now get this error message:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'Zend_Application_Resource_Exception'
    with message 'Bootstrap file found for module "default" but bootstrap
    class "Default_Bootstrap" not found' in
    /usr/share/ZendFrameworkCli/library/Zend/Application/Resource/Modules.php:83
    Stack trace: #0
    /usr/share/ZendFrameworkCli/library/Zend/Application/Bootstrap/BootstrapAbstract.php(683):
    Zend_Application_Resource_Modules->init() #1
    /usr/share/ZendFrameworkCli/library/Zend/Application/Bootstrap/BootstrapAbstract.php(626):
    Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('modules')</p>
    
    <h1>2 /usr/share/ZendFrameworkCli/library/Zend/Application/Bootstrap/BootstrapAbstract.php(586):</h1>
    
    <p>Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #3
    /usr/share/ZendFrameworkCli/library/Zend/Application.php(355):
    Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #4
    /Users/Martin/Dropbox/Repositories/realestatecms/public/index.php(25):
    Zend_Application->bootstrap() #5 {main} thrown in
    /usr/share/ZendFrameworkCli/library/Zend/Application/Resource/Modules.php
    on line 83</p>
  </blockquote>
  
  <p>Where is it getting <code>Default_Bootstrap</code> from as a class name?!</p>