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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:18:05+00:00 2026-06-08T18:18:05+00:00

So I am working on a sample database project. I have a LoginController.php, a

  • 0

So I am working on a sample database project.
I have a LoginController.php, a Faculty database, and a login page (phtml).

I get the error Fatal error: Class ‘Faculty_DB’ not found in /usr/local/zend/apache2/htdocs/InternProject1/application/controllers/LoginController.php on line 25

In the LoginController.php I have the following (plus some more):

public function indexAction()
{
    $login = new Form_Login();
    //$this->view->login = $login; 

    $request = $this->getRequest();
    if($request->isPost())
    {
        $data = $request->getPost();
        //$this->isValid(
        if($this->getRequest()->getPost())
        {
            $username = $request->getParam('username');
            $password = $request->getParam('password');
            // echo " What you entered is: $username and $password";
//line 24       
            $faculty = new Faculty_DB();
//then conditions for validation.

This references

class Faculty_DB extends Zend_Db_Table_Abstract

which is located in application/models/ directory

I have the following in Bootstrap.php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function _initAutoload()
    {
        $autoLoader = Zend_Loader_Autoloader::getInstance();
        $autoLoader->registerNamespace(array('App_'));
        $resourceLoader = new Zend_Loader_Autoloader_Resource(array(
            'basePath'  => APPLICATION_PATH,
            'namespace' => '',
            'resourceTypes'     =>
                array('form'=>
                    array('path'        => 'forms/',
                        'namespace'     => 'Form_'
                    ),
                ),
            ));
        return $autoLoader;         
    }
}

Any clue on how to fix this?
I tried the following:

 protected function _initResourceAutoloader()
 {
     $autoloader = new Zend_Loader_Autoloader_Resource(array(
         'basePath'  => APPLICATION_PATH,
         'namespace' => 'Application',
     ));

     $autoloader->addResourceType( 'model', 'models', 'Model');
     return $autoloader;
 }

but when I do that, it tells me it can’t find my Login_Form;

  • 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-08T18:18:06+00:00Added an answer on June 8, 2026 at 6:18 pm

    Given that your application namespace is Application, try:

    • Put your faculty DB class in application/models/Faculty.php
    • Name it Application_Model_Faculty
    • Extend it from Application_Model_DbTable_Faculty
    • Put the DbTable class in application/models/DbTable/Faculty.php

    Since you are using Zend_Application, it will take care of setting up the autoloader and special prefixes like Form_, Model_, Plugin_ etc for you, so you can safely remove the _initAutoload and _initResourceAutoloader from your Bootstrap.

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

Sidebar

Related Questions

I am working on a project that needs a database. I have found a
I am working with the sample Home application project on http://developer.android.com/resources/samples/Home/index.html I've added another
I am working on a sample map kit app for iOS. I have everything
I am working on a sample project for testing KIF framework and Zapp. The
I'm working on a project involving C# and a SQL Server 2008 database. In
I am working on my first NHibernate project, and have the following setup/requirement. I
I have tried pretty much everything to get M:M mappings working in S#arp Architecture.
I have made one sample project which can add and edit records from SQLite
This is a simple problem. I am working on a PHP project related to
I'm trying to design a database for a small project I'm working on. Eventually,

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.