Search code examples
phpzend-frameworkmodelautoloader

how to add another folder level to send framework autoloader?


i have this simple setup

-controllers
    IndexController.php
          here somewhere i call new Application_Model_Sites_Sites()
+layouts
-models
    -sites
        Sites.php
           class Application_Model_Sites_Sites
           { .. }
+library
+public

and i get Fatal error: Class 'Application_Model_Sites_Sites' not found in ..

The strange thing is that under xampp in windows it works perfect, but when i place it on a linux server i get that error

I'm thinking i need to tell zend about those sub-folders, but i have the impression that it should know about them because i use them in the class name

Any ideas what am i missing?

application.ini
    [production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
    appnamespace = "Application"
    resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
    resources.frontController.params.displayExceptions = 1
    resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
    resources.view[]=
    resources.view.helperPath.Zend_View_Helper = APPLICATION_PATH "/views/helpers"
    [staging : production]
    [testing : production]

and by bootstrap is empty for now


Solution

  • shouldnt it be Models with an s - Application_Models_Sites_Sites?