I have a small (very small) zend project that covers two modules, the admin and the front module. I have also managed to create a form under the ‘front’ module and was also able to use it in the controllers of the front module as well. Now, my problem is that when I created a form under the ‘admin’ module, and use it in the admin controllers as well, the php cannot anymore detect where to locate the class. Thus, this error is displayed:
Fatal error: Class 'Admin_Form_Login' not found in C:\xampp\htdocs\projects\zend\finder\application\modules\admin\controllers\IndexController.php on line 18
I was so confused that in the front module, it is working but on the admin module, very similar way of creation and usage, it fails. NOTE: I used zf tool to create the forms.
Here is my application.ini, maybe this might help.
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 "/controllers"
resources.frontController.params.displayExceptions = 0
resources.modules[] =
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.view.helperPath.Finder_View_Helper = APPLICATION_PATH "/../library/Finder/View/Helper"
I am using Zend 1.11.12 for this.
Thanks in advance.
I’m guessing you don’t have a module bootstrap class, as everything else looks fine. So all you need to do is create a file at
application/modules/admin/Bootstrap.phpwhich contains the following:this will be run by your application bootstrap, and
Zend_Application_Module_Bootstrapby default sets up an instance of the module resource autoloader, which will in turn enable resources classes beginning withAdmin_.