Hello all,

I'm pretty new to ZF (installed it 2 days ago) and I'm looking for some direction. I'm using ZF 1.10

this is my current setup

DIRECTORY TREE
Code:
application
--configs
---application.ini
--forms
--layouts
--modules
---admin
----controllers
------IndexController.php
------ErrorController.php
------ConfigController.php
----forms
----models
----views
----boostrap.php
---public
----controllers
------IndexController.php
------ErrorController.php
------AboutController.php
----forms
----models
----views
----boostrap.php
--bootstrap.php
library
script
tests
data
public
--index.php
APPLICATION/CONFIGS/application.ini
Code:
[production]
; PHP settings we want to initialize
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

; Make sure the following is on the include_path
includePaths.library = APPLICATION_PATH "/../library"

; Indicate the path and classname of the bootstrap
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

; Bootstrap resources:
; - Front Controller
; - Layout
; - Database
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view[] =

[staging : production]
; Were you to have a 'staging' environment, you could customize application
; settings here

[testing : production]
; For testing, we want to display errors and use a different database
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
; For development, we want to display errors and use a different database
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1


resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "mysite"
resources.db.isDefaultTableAdapter = true

; Find the block with resources.db and these lines below them.
resources.db.params.profiler.enabled = true
resources.db.params.profiler.class = Zend_Db_Profiler_Firebug

; FrontController Resource Settings
resources.frontController.defaultController = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "public"
resources.frontController.prefixDefaultModule = true
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

includePaths.models = APPLICATION_PATH "/models/"
autoloadernamespaces.mastermodel = "MasterModel"

;resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
;resources.modules =
APPLICATION/bootstrap.php
PHP Code:
<?php

/**
 * Application bootstrap
 * 
 * @uses    Zend_Application_Bootstrap_Bootstrap
 * @package QuickStart
 */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    
/**
     * Bootstrap autoloader for application resources
     * 
     * @return Zend_Application_Module_Autoloader
     */
    
    
protected function _initAutoload()
    {

        
$autoloader = new Zend_Application_Module_Autoloader(array(   
            
'namespace' => 'Public',
            
'basePath'  => dirname(__FILE__) . '/modules/public'), array(   
            
'namespace' => 'Admin',
            
'basePath'  => dirname(__FILE__) . '/modules/admin'), array(
            
'namespace' => 'Default',
            
'basePath'  => dirname(__FILE__),         

        ));
        return 
$autoloader;
    }

    
/**
     * Bootstrap the view doctype
     * 
     * @return void
     */
    
protected function _initDoctype()
    {
        
$this->bootstrap('view');
        
$view $this->getResource('view');
        
$view->doctype('XHTML1_STRICT');
    }

}
APPLICATION/MODULES/PUBLIC/bootstrap.php
PHP Code:
<?php

/**
 * Application bootstrap
 * 
 * @uses    Zend_Application_Bootstrap_Bootstrap
 * @package QuickStart
 */
class Public_Bootstrap extends Zend_Application_Module_Bootstrap
{

    
}
APPLICATION/MODULES/PUBLIC/CONTROLLERS/IndexController.php
PHP Code:
<?php


class Public_IndexController extends Zend_Controller_Action
{

    public function 
indexAction()
    {

        echo 
'in modules/public'


    }
    public function 
testAction()
    {

        echo 
'in modules/public/test'

    }    
}
APPLICATION/MODULES/PUBLIC/CONTROLLERS/AboutController.php
PHP Code:
<?php


class Public_AboutController extends Zend_Controller_Action
{

    public function 
indexAction()
    {

        echo 
'in modules/public/about'

    }
}
APPLICATION/MODULES/ADMIN/CONTROLLERS/IndexController.php
PHP Code:
<?php


class Admin_IndexController extends Zend_Controller_Action
{

    public function 
indexAction()
    {

        echo 
'in modules/admin';

    }
}
and these are my issues:

  1. I'm able to access the indexAction in application/modules/public/IndexController.php just fine by going to http://mysite.localhost/ (I use virtual hosts). However, how do I access the AboutController? I get an application error when I try to access it by going to http://mysite.localhost/about or http://mysite.localhost/public/about
  2. how do I access the testAction in application/modules/public/IndexController.php? in other words, I'm only able to access the indexAction of the IndexController.php of both the Public and Admin modules, but not other controllers within the modules or other actions within the controllers.
  3. even though there are bootstraps in each individual module's folder, they are not loaded at all. only the main application/bootstrap.php is loaded. I tried putting a } anywhere in the other 2 bootstrap files and no error was thrown so they are not being loaded at all.


any help would be GREATLY appreciated!! thanks