Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento died after compilation: how to disable using compiled files without admin panel access?

Tried to compile Magento 1.6 here:

Magento admin panel, System, Tools, Compilation

It compiled and then I enabled it. After that, site died. Here's the stack (but that's not important)

Warning: include_once(Mage_Core_functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/public_html/app/Mage.php on line 36  Warning: include_once() [function.include]: Failed opening 'Mage_Core_functions.php' for inclusion (include_path='/home/mysite/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/app/Mage.php on line 36  Warning: include_once(Varien_Autoload.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/public_html/app/Mage.php on line 37  Warning: include_once() [function.include]: Failed opening 'Varien_Autoload.php' for inclusion (include_path='/home/mysite/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/app/Mage.php on line 37  Fatal error: Class 'Varien_Autoload' not found in /home/mysite/public_html/app/Mage.php on line 53 

The important thing: how to get it up again? Maybe through editing MySQL tables?

like image 731
Dmitry Avatar asked Dec 16 '11 17:12

Dmitry


2 Answers

If you've got shell access, running

$ php shell/compiler.php disable 

from the root of your site will disable compilation mode.

If that doesn't work it means someone's diddled with the compiler configuration file in such a way that it won't work with the compiler.php script. If that's the case look in

includes/config.php 

and comment out the two define function calls

##define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src'); #define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat'); 
like image 134
Alan Storm Avatar answered Sep 17 '22 03:09

Alan Storm


comment out the two define function calls in includes/config.php path

#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src'); #define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat'); 
like image 44
vikash Avatar answered Sep 21 '22 03:09

vikash