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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:19:40+00:00 2026-05-22T17:19:40+00:00

I am using Zend_Application_Bootstrap_Bootstrap, but framework can’t load modeles. Index.php define(‘ROOT_PATH’, realpath(dirname(dirname(__FILE__)))); define(‘APP_PATH’, realpath(

  • 0

I am using Zend_Application_Bootstrap_Bootstrap, but framework can’t load modeles.

Index.php

define('ROOT_PATH', realpath(dirname(dirname(__FILE__))));
define('APP_PATH', realpath( ROOT_PATH . '/application'));

set_include_path(realpath(ROOT_PATH . '/library') . PATH_SEPARATOR . get_include_path());

require_once 'Zend/Application.php';
$app = new Zend_Application('dev', APP_PATH . '/configs/application.ini');
$app->bootstrap()->run();

Application.ini

bootstrap = APP_PATH "/Bootstrap.php"

phpSettings.display_errors = on
phpSettings.display_startup_errors = on
phpSettings.error_reporting = E_ALL|E_STRICT
phpSettings.date.timezone = "Europe/London"

resources.frontController.controllerDirectory = APP_PATH "/controllers"
resources.frontController.throwExceptions = on
resources.view.encoding = "UTF-8"
resources.view.contentType = "text/html;charset=utf-8"
resources.view.doctype = "XHTML1_STRICT"
resources.layout.layoutPath = APP_PATH "/views/layouts"
resources.layout.layout = "layout"
resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "localhost"
resources.db.params.dbname = "foo"
resources.db.params.username = "user"
resources.db.params.password = "password"
resources.db.params.charset = "utf8"

Bootstrap.php:

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
}

Folder tree:

Myproject->
/application
   /configs
   /controllers
   /models
      /Mytest.php
   /views
   Bootstrap.php
/public
   index.php

Problem:
I trying to create new Mytest() in controller, but i get “class not found in…”
When I add to bootstrap Zend_Loader::loadClass(‘Mytest’, APP_PATH . ‘/models/’) everything works.

My questions is, how to setup Zend_Application_Bootstrap_Bootstrap via application.ini to autoload models folder ?

Thank you.

  • 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-22T17:19:40+00:00Added an answer on May 22, 2026 at 5:19 pm

    Model classes are by default named in ZF under ‘Application’ namespace.
    So your class would be named as ‘Application_Model_Mytest’

    You can set the default namespace ‘Application’ by adding this to the application.ini

    appnamespace = "Application"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I set up a Zend Framework application using Zend_Tool, but I wanted multiple modules
I have a PHP MVC application using Zend Framework. As presented in the quickstart,
All, I have a PHP Web application built using Zend Framework and MVC with
I'm learning zend framework from zendCast and can't find the problem I'm using: -Zend
So far i have been using Bootstrap.php to load my application.ini config into Zend_Registry
I am using the Zend library's XML RPC Client in a PHP application to
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
Using Zend Framework, I've created a Model to insert a record into a database.
I wrote a command line utility using Zend Framework to do some nightly reporting.
I am using Zend Debugger to debug my php application built based on the

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.