Anton_Sh
Anton_Sh

Reputation: 225

Fix compilation magento errors

I want to enable magento compilation, but when I enable it I see follow errors:

Warning: include_once(.../includes/src/Mage_Core_functions.php) [function.include-once]: failed to open stream: No such file or directory in .../app/Mage.php on line 36

Warning: include_once() [function.include]: Failed opening '.../includes/src/Mage_Core_functions.php' for inclusion (include_path='/.../includes/src:.:/usr/share/php') in .../app/Mage.php on line 36

Warning: include_once(.../includes/src/Varien_Autoload.php) [function.include-once]: failed to open stream: No such file or directory in /.../app/Mage.php on line 37

Warning: include_once() [function.include]: Failed opening '.../includes/src/Varien_Autoload.php' for inclusion (include_path='.../includes/src:.:/usr/share/php') in .../app/Mage.php on line 37

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

Can anybody help me to fix them? I want compilation to be enabled. In Internet every answer on this question was disable the compilation. I want the compilation to be enabled. Just for information my magento version is 1.7.0.0

Upvotes: 3

Views: 11461

Answers (2)

qualle
qualle

Reputation: 1367

Deactivate the compiler like Oğuz Çelikdemir recommended and then click on "Start compilation process" (or something like that. It's "Kompilierungsvorgang starten" in German). This initiates the compilation process rather then just "activating" it. This worked for me.

Upvotes: 1

Oğuz Çelikdemir
Oğuz Çelikdemir

Reputation: 4980

did you change access rights on /includes directory? Because, after the compilation, compiled source codes reside in /includes/src directory!

$ chmod o+w includes includes/config.php

# if its not work, do following
$ chmod -R 777 includes/

Modify : To close the compilation mode, open the file includes/config.php and comment out the following line :

define(’COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’); 
#define(’COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

to

#define(’COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’);
#define(’COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);  

If you want to enable compilation mode then go to admin section press the "RUN COMPILATION" button.

Summary : I guess, you had forgetten to set directory permission before the compilation process therefore the compilation process has not been create compiled source code directory!

Remarks : The compilation process might be headache. On each code modifications, you should compile again or contrary, you should disable to compile before the modification or extension installation. Some extensions are trouble with that. That is why so many people do not want to use in this option. Also, in v2.0 of Magento, the compilation process dropped, not available anymore!

Upvotes: 10

Related Questions