Autoloader Error after updating to Zend Framework 2.2.5

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
vGeek
Forum Newbie
Posts: 1
Joined: Fri Nov 15, 2013 3:49 pm

Autoloader Error after updating to Zend Framework 2.2.5

Post by vGeek »

Hi,

As a warning I am not a programmer. I inherited an application which uses Zend Framework and needs to be updated and I'm trying to do my best here. I will really appreciate if you can provide detailed information to troubleshoot the issue.

After updating Zend Framework to version 2.2.5 I started getting the error shown below.
I came across this online but I am not sure how to use the examples to correct the error.
http://framework.zend.com/manual/2.1/en ... ctory.html

Code: Select all

Warning: require_once(/Zend/Loader/Autoloader.php): failed to open stream: No such file or directory in D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs\globals.php on line 38

Fatal error: require_once(): Failed opening required '/Zend/Loader/Autoloader.php' (include_path='.;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/library/;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/library/Doctrine/;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/library/Braishfield/;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/application/;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/application/default/models/;D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs/application/default/forms/') in D:\vFabricWS\vfabric-web-server\ProductionApp\htdocs\globals.php on line 38
****This is the main global data configuration file I'm using:**

Code: Select all

//Define root path
//define('ROOT_PATH', dirname(__FILE__));

//Modify include path to include path to libraries and application folders
ini_set('include_path', '.' . 
        PATH_SEPARATOR . ROOT_PATH . '/library/' . 
        PATH_SEPARATOR . ROOT_PATH . '/library/Doctrine/' .
        PATH_SEPARATOR . ROOT_PATH . '/library/CompanyName/' .
        PATH_SEPARATOR . ROOT_PATH . '/application/'  . 
        PATH_SEPARATOR . ROOT_PATH . '/application/default/models/'  . 
        PATH_SEPARATOR . ROOT_PATH . '/application/default/forms/'
        );

//Include Loader File, and Load needed Classes
//require_once 'Zend/Loader.php';
require_once '/Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);

//Load some config files and store them in the Registry for the rest of the
//app to access
if (! defined( 'UNIT_TESTING' ))
{
    $config = new Zend_Config_Ini(ROOT_PATH . '/config/config.ini', 'application');
}
else
{
    $config = new Zend_Config_Ini(ROOT_PATH . '/config/config.ini', 'application');
}



Zend_Registry::set('config',$config);


//turn error reporting on if the debug flag is set in teh config file
$logger = new Zend_Log();
$writer = new Zend_Log_Writer_Firebug();
$logger->addWriter($writer);
Zend_Registry::set('logger', $logger);

if($config->debug)
{
	error_reporting(E_ALL);
	ini_set('display_errors', 'on');
	$writer->setEnabled(true);

}
else 
{
    ini_set('display_errors','off');
	$writer->setEnabled(false);
    
}

ini_set('log_errors','on');
ini_set('error_log',ROOT_PATH . DIRECTORY_SEPARATOR . 'logs/phperrors.log');

//Set mssql text sizes
ini_set("mssql.textlimit", "65536");
ini_set("mssql.textsize", "65536");

//set default time zone for the application
date_default_timezone_set('America/New_York');
Post Reply