Trying to install a Magento Module that seems to not be Compiler Compatible - Magento 1.7.0.2

▼魔方 西西 提交于 2019-12-11 11:04:43

问题


trying for some time how to install magento extension on magento 1.7.0.2

Cash On Delivery by mage specialist - http://www.magentocommerce.com/magento-connect/cash-on-delivery-6259.html

tried

three steps 1) disable cache and compliation , install the extension and reenable the cache and compilation 2) disable compliation and cache , install the extension and enable the compilation and cache

getting errors : Fatal error: Class ‘MSP_CashOnDelivery_Helper_Data’ not found in /home/bwcom/public_html/app/Mage.php on line 546

please advise what steps should i follow


回答1:


Proper Steps to Install a Module when the compiler has been activated and turned on.

Disable the compiler, disable the Magento cache and manually clear cache by deleting all mage--? subfolders in var/cache/

Install the module and log into the Magento admin panel so the installers run. Log back out and then back in to fully load admin code, adminhtml blocks and adminhtml skin files.

Test module operation on backend and frontend and run website without compilation until you're satisfied that the module is fully functional.

Enable all the Magento caching you were using before you installed the module and test website function.

Take a sledge hammer and smack the top of your foot so you have a pain reference for what follows.

Go into the System Tools -> Compiler page and do a code recompile. This empties and recreates the compiled code base. If you do not do this, you loose your website to a mishmash of old and new code.

Only after a successful recompile do you attempt to enable compilation. You probably will loose your website to a module that's not been made fully compatible with the Magento kludge compiler... Disable the compiler and your website should be operational again. You may have to do another Magento cache clear.

Contact your third party module developer and see if they intend for it to work under Magento's kludge compiler...

For the most part, under Magento 1.7.x.x and 1.8.x.x, there has been a lot of code rewrite that makes the compiler a lot less performance enhancing that it used to be when it was introduced for 1.4.x.x and there are other methods that will cause you less frustration and more performance gain out there. If it's a tossup between a useful module and a useless compiler, the module is more important.


Manually disabling the compiler when a module install has you backed into a corner

To manually disable the compiler...

1) find includes/config.php and comment the two following lines by putting a # at the beginning of the line like so:

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

2) go to includes/src and delete all the contents

3) go to var/session and delete all the session files

4) go to var/cache and delete all the mage--? folders

or to use the script in shell/, go to shell folder and execute at the command line:

php -f compiler.php -- clear

and then delete session files and cache folders as in steps 3 and 4 above

The compiler should now be completely disabled and you should be able to start up your Magento installation.



来源:https://stackoverflow.com/questions/19127217/trying-to-install-a-magento-module-that-seems-to-not-be-compiler-compatible-ma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!