Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7184345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:10:57+00:00 2026-05-28T18:10:57+00:00

I have come across a strange problem with Zend_Framework, I can not load forms

  • 0

I have come across a strange problem with Zend_Framework, I can not load forms or models from any module other than default.

I have the following line of code in my controller (in the user module)

$myAccountModel = new User_Model_MyAccount();

However all i get is the error

Fatal error: Class 'User_Model_MyAccount' not found in F:\My Webs\freedate\application\modules\user\controllers\MyAccountController.php on line 13

I have checked the files path and class name and all is correct, I have this project setup similar to other ZF projects I have done in the past, the only difference is that this is on a WAMP server rather than a LAMP server.

If I try to load a model or form from the default module it loads fine, these line of code produce no errors and the classes load fine.

$loginForm = new Form_Login();
$loginModel = new Model_Login();

If someone can shed some light as to what is going on here it would be most helpful as I have now hit a brick wall!!

I am using ZF 1.11.11 btw.

Many thanks

Garry

[EDIT]

This is definatly a probelm with ZF autoloader, if I add the following line the error goes away.

require_once(APPLICATION_PATH . '/modules/user/models/MyAccount.php');

In my application.ini i have

; modules
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =

and in my bootstrap.php I have

/**  * Initialize autoloader  
 * @return Zend_Loader_Autoloader  
 */     
protected function _initAutoload() {    
    return Zend_Loader_Autoloader::getInstance(); 
}

/**  * Initialize module autoloader  
 * @return Zend_Application_Module_Autoloader  
 */ 
protected function _initModuleAutoload() {
    $modelLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => '',
            'basePath' => APPLICATION_PATH . '/modules/default'));

    return $modelLoader; 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:10:58+00:00Added an answer on May 28, 2026 at 6:10 pm

    Have you tried to add an empty Module_Bootstrap to the specific module? Like so:

    <?php
    
    class User_Bootstrap extends Zend_Application_Module_Bootstrap 
    {// nothing in here except you really want to do anything here ;)}
    

    Once you do this, you can remove the _initAutoload() and _initModuleAutoload() methods from your bootstrap. When you create a module bootstrap, the Zend_Application_Module_Autoloader is automatically created by default for that module.

    See The Module Resource Autoloader

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've come across a really strange problem. I have written a simple Deck class
I have come accross a strange problem that can be illustrated using the 2
I have come across some strange behaviour, and I'm assuming a bug in Firefox,
I have just come across something that is quite strange and yet I haven't
I have come across what must be a common problem. When I have an
I've come across a strange thing in Firefox, which has become a problem to
I have come across a strange defect. I am using Orbeon 3.9 CE on
I have come across a strange behavior of Java that seems like a bug.
I just come across a strange problem where i cannot retrieve the sql stored
I've come across a strange render bug on iPhone OS 3.0... I have two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.