How do I disable Magento Compiler?

1,919 人次阅读
没有评论

共计 1138 个字符,预计需要花费 3 分钟才能阅读完成。

介绍了几种取消编译的方法,有时候系统坏掉了,还是可以用的。

特别是对于某些升级的时候出现错误的人来说,比较适用。

这篇文章是转载的。

Magento Compiler feature should be disabled on any changes in loaded Magento classes, in other words, you need to disable Magento Compilation every time before installing new extension or initiating upgrade/downgrade/installation or removal of any Magento module.

 

To disable Magento Compiler you can use one of the following methods:

Admin Interface

  • navigate to System > Tools > Compilation page and click on Disable button:

    How do I disable Magento Compiler?

  • Flush Magento cache

 

Console/SSH

  • Check current compilation status
    $ php -f shell/compiler.php -- state
    Compiler Status:          Enabled
    Compilation State:        Compiled
    Collected Files Count:    6042
    Compiled Scopes Count:    4
  • Disable Magento compilation:
    $ php -f shell/compiler.php -- disable
    Compiler include path disabled
  • Clear all compiled files
    $ php -f shell/compiler.php -- clear
    Compilation successfully cleared
  • Ensure that compiler is disabled now by checking its status:
    $ php -f shell/compiler.php -- state
    Compiler Status:          Disabled
    Compilation State:        Not Compiled
    Collected Files Count:    0
    Compiled Scopes Count:    0

 

FTP/Filemanager

  • delete includes directory or rename it to any other name (_includes.unused for example):
    ftp :~> mv ./includes ./includes.unused
  • Flush Magento cache
正文完
 0