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

  • Home
  • SEARCH
  • 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 9143649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:04:36+00:00 2026-06-17T10:04:36+00:00

Warning: include_once(Application/Model/Hiring.php): failed to open stream: No such file or directory in /var/www/hiring/library/Zend/Loader.php on

  • 0
        Warning: include_once(Application/Model/Hiring.php): failed to open stream: 
No such file or directory in /var/www/hiring/library/Zend/Loader.php on line 146

in the inclusion path

Warning: include_once(): Failed opening 'Application/Model/Hiring.php' for inclusion 
(include_path='/var/www/hiring/application/../library:/var/www/hiring/library:./application
/models/:./application/controllers/:./application/views/scripts/:.:/usr/share/php:/usr/local
/ZendFramework/library') in /var/www/hiring/library/Zend/Loader.php on line 146

and my index file is

<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));

// define root path
defined('ROOT_PATH') || define('ROOT_PATH', realpath(dirname(__FILE__) . '/'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));



// Ensure library/ is on include_path
set_include_path(realpath(dirname(__FILE__) . '/library')
. PATH_SEPARATOR . './application/models/'
. PATH_SEPARATOR . './application/controllers/'
. PATH_SEPARATOR . './application/views/scripts/'
. PATH_SEPARATOR . get_include_path());

require_once 'Zend/Application.php';
require_once 'Zend/Loader/Autoloader.php';
/** Zend_Application */


$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('hiring');
$loader->setFallbackAutoloader(true);

Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Registry');
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Db_Table');
Zend_Loader::loadClass('Zend_Db_Statement');
//Zend_Loader::loadClass('Zend_Mail_Transport_Smtp');
//Zend_Loader::loadClass('Zend_Mail_Transport_Sendmail');
//Zend_Loader::loadClass('Zend_Mail');
Zend_Loader::loadClass('Zend_Session_Namespace');
Zend_Loader::loadClass('Zend_Db_Adapter_Pdo_Pgsql');
//Zend_Loader::loadClass('Zend_Date');
Zend_Loader::loadClass('Zend_Log');


// setup controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(false);
$frontController->setBaseUrl('http://hiring.local');
$frontController->setControllerDirectory('/application/controllers');

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);


$application->bootstrap()->run();

why iam getting this error i looked into loader.php at line 146 at that line there is

include_once($filename) so the error is originating from there

  • 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-17T10:04:37+00:00Added an answer on June 17, 2026 at 10:04 am

    There are quite a few problems here:

    • application/models, application/controllers and application/views/scripts should not be on the include path.
    • $loader->registerNamespace('hiring'); should probably be $loader->registerNamespace('Hiring_'); (although there’s no sign in the code sample you’ve included that you are using this namespace).
    • $loader->setFallbackAutoloader(true); is probably not needed (there’s no sign in the code sample you’ve included that you need this).
    • All of the Zend_Loader::loadClass lines should be removed. The whole point of an autoloader is that you don’t need to then require in or load classes yourself
    • At least the front controller configuration should be moved to your bootstrap class

    But none of these things will affect the problem you are reporting. The standard autoloader setup will only load classes whose name can be mapped directly to the file system (by converting underscores to slashes in the path, e.g. the class Zend_Db_Table would live at library/Zend/Db/Table.php). The class Application_Model_Hiring does not fit this model, if you want to use this naming scheme as well you need to also setup a resource autoloader, which maps just the last part of the class name to some pre-defined sub-folders within application/.

    Add the following method to your bootstrap class:

    protected function _initAutoloader()
    {
        $autoloader = Zend_Loader_Autoloader::getInstance();
        $autoloader->registerNamespace('Hiring_');
    
        $applicationResourceAutoloader = new Zend_Loader_Autoloader_Resource(array(
            'basePath' => APPLICATION_PATH,
            'namespace' => 'Application'
        ));
        $autoloader->pushAutoloader($applicationResourceAutoloader);
    
        return $autoloader;
    }
    

    This setups up the standard autoloader ($autoloader = Zend_Loader_Autoloader::getInstance();), which will autoload the Zend Framework classes. It then registers a namespace ‘Hiring’, which you only need if you are including classes that start with this name in your library folder.

    It then creates a separate resource autoloader with the namespace ‘Application’, which will load classes from the application folder, including models. Assuming the class Application_Model_Hiring is defined at application/models/Hiring.php it should then work.

    More info at http://framework.zend.com/manual/1.12/en/zend.loader.autoloader-resource.html

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

Sidebar

Related Questions

> Warning: include_once(/PoliticalForum/headerSite.php) [function.include-once]: failed to open stream: No such file or > directory
php include_once is failing for me with the failed to open stream: No such
I get the following error messages: Warning: include_once(Zend\Db.php) [function.include-once]: failed to open stream: No
When I try to include a file using include_once in php which shows warning
I am having the following problem: Warning: include_once() [function.include]: Failed opening 'Mail_Mime/mime.php' for inclusion
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/happy/public_html/source/imap/fet_mail_from_email_add.php on line 7 can't connect:
//$GLOBAL_includesPath = http://localhost/smthing/; <? include_once $GLOBAL_includesPath.'global_menu.php'; ?> error: Warning: include_once() [function.include-once]: http:// wrapper is
I am getting the following error while running the code, Warning: require_once(product.php) [function.require-once]: failed
I am trying to use this: include_once(PoliticalForum/StoredProcedure/User/number_login_attempts.php); Warning: include_once(../../untitled/sanitize_string.php) [function.include-once]: failed to open stream:
I have a file index.php in root directory: <?php require_once ./include/common.php; ?> and file

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.