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 8503735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:50:19+00:00 2026-06-11T01:50:19+00:00

I have tried many different ways to solve this that I have found online

  • 0

I have tried many different ways to solve this that I have found online but they have not worked, so please can someone help me.

I am getting this error

Fatal error: Class ‘Admin_Form_Login’ not found in pathToProject/modules/admin/controllers/LoginController.php on line 13

my project is

Application

— modules

——admin

——–controllers

——–forms

——–models

——–views

——default

——–controllers

——–forms

——–models

——–views

——aboutus

——–controllers

——–forms

——–models

——–views
etc
etc

My Controller

class Admin_LoginController extends Zend_Controller_Action
{

  public function init()
  {
     /* Initialize action controller here */
  }

  public function indexAction()
  {
      $form = new Admin_Form_Login();
      $this->view->form = $form;
      // action body
  }
}

My Form

class Admin_Form_Login extends Zend_Form
{

public function init()
{
    /* Form Elements & Other Definitions Here ... */

    $this->setAction("/admin/index/login")->setMethod("post");

    $username = new Zend_Form_Element_Text('username');
    $username->setLabel('Username')
    ->setOptions(array('size' => '30'));


    $password = new Zend_Form_Element_Password('password');
    $password->setLabel('Password')
    ->setOptions(array('size' => '30'));


    $submit = new Zend_Form_Element_Submit('submit');
    $submit->setLabel('Log in')
    ->setOptions(array('class' => 'submit'));

    $this->addElement($username)
    ->addElement($password)
    ->addElement($submit);


}


}

MY Bootstrap.php

class Admin_Bootstrap extends Zend_Application_Module_Bootstrap
{
    protected function _initAutoload() {
        $autoloader = new Zend_Application_Module_Autoloader(array(
        'namespace' => 'Admin_',
        'basePath' => APPLICATION_PATH."/modules/admin",
    ));
    return $autoloader;
    }
}

Here is my App ini maybe something in there

[bootstrap]

Autoloadernamespaces[] = "Admin_"
Autoloadernamespaces[] = "Default_"
Autoloadernamespaces[] = "Aboutus_"

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultModule = "default"
resources.modules[] = ""

resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.prefixDefaultModule = "1"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

admin.resources.layout.layout = layout
admin.resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
default.resources.layout.layout = default
default.resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

and my view

$this->form

Thanks for any help.


I added the following in the production part ok my application.ini and it started worked Not sure why.

Autoloadernamespaces[] = "Admin_"
Autoloadernamespaces[] = "Default_"
Autoloadernamespaces[] = "Aboutme_"

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultModule = "default"
resources.modules[] = ""

resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
  • 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-06-11T01:50:21+00:00Added an answer on June 11, 2026 at 1:50 am

    Try this:

    protected function _initAutoload() {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => '',
            'basePath' => APPLICATION_PATH,
        ));
        return $autoloader;
    }
    

    There’s no namespace (only if you had one i.e. Application_).

    As for the config file:

    [production]
    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0
    
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    
    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    resources.modules[] =
    
    resources.layout.layout = "layout"
    default.resources.layout.layoutPath = "/views/layout"
    admin.resources.layout.layoutPath = "/views/layout" 
    
    [staging : production]
    
    
    [testing : production]
    
    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried many ways to solve this problem but none works. suppose I have
I have tried to do this in many different ways but the most obvious
Hello friends I have tried many times but I am not successful than please
I have researched this and tried many different ways with no success. I have
I have tried many ways of Asynchronously loading images and they ALL have this
I know this must be a trivial question, but I've tried many different ways,
Hello I have tried this many different ways and have followed the tutorial at
I have tried so many different ways, please help. My directory structure is as
I am using jQuery fullcalendar plugin , I have tried altering this many different
I have tried many permutations but they all don't seems to work well. Am

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.