cancel
Showing results for 
Search instead for 
Did you mean: 

Files not found while installing magento 1.9

Files not found while installing magento 1.9

I'm trying to install magento 1.x on my centos machine. After dowloading and extracting magento i faced this errrors.

Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /home/xxxx/app/Mage.php on line 50

Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php') in /home/xxxx/app/Mage.php on line 50

Warning: include_once(Varien/Autoload.php): failed to open stream: No such file or directory in /home/xxxx/app/Mage.php on line 51

Warning: include_once(): Failed opening 'Varien/Autoload.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php') in /home/xxxx/app/Mage.php on line 51

Fatal error: Class 'Varien_Autoload' not found in /xxxx/app/Mage.php on line 54

I tried to run

php shell/compiler.php compile

 the the errors disappeared and the installation page appeared but without any next or back buttons. How can i fix this issue?

2 REPLIES 2

Re: Files not found while installing magento 1.9

Looks like the include paths are not being set correctly. Magento adds additional folders to the include path variable, which tells PHP where to look for file includes, e.g. ./app/code/core/.  The include path is set in the app/Mage.php file as part of the bootstrap procedure:

 

define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);
define('BP', dirname(dirname(__FILE__)));

Mage::register('original_include_path', get_include_path());

if (defined('COMPILER_INCLUDE_PATH')) {
    $appPath = COMPILER_INCLUDE_PATH;
    set_include_path($appPath . PS . Mage::registry('original_include_path'));
    include_once "Mage_Core_functions.php";
    include_once "Varien_Autoload.php";
} else {
    /**
     * Set include path
     */
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
    $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
    $paths[] = BP . DS . 'lib';

    $appPath = implode(PS, $paths);
    set_include_path($appPath . PS . Mage::registry('original_include_path'));
    include_once "Mage/Core/functions.php";
    include_once "Varien/Autoload.php";

 

Make sure that the set_include_path function is not disabled by php.ini. You can also add some debug code after the call to set_include_path in the file above to retrieve the current value of include_path, like this:

 

echo "Include path: " . get_include_path();
Sindre M, CEO & Founder
ProperHost.com - The Magento Hosting Experts

Re: Files not found while installing magento 1.9

Thank you for your reply.

I tried to debug set_inlcude_path in app/Mage.php but magento tries to set value

 set_include_path($appPath . PS . Mage::registry('original_include_path'));
echo $appPath . PS . Mage::registry('original_include_path');
//output: /home/****/app/code/local:/home/****/app/code/community:/home/****/app/code/core:/home/****/lib:.:/usr/lib/php:/usr/local/lib/php:/home/username/phpInclude 

and when i print the value 

echo "Include path: " . get_include_path();
//output: .:/usr/lib/php:/usr/local/lib/php:/home/username/php

set_include_path is always returning false.

How can i check if set_include_path is enabled or disabled?