I'm turning to turn on the compilation for a magento site and once I do the product and category pages give

[type] => 64
[message] => Cannot redeclare class Mage_Core_Model_Resource_Helper_Mysql4
[file] => /includes/src/__catalog.php
[line] => 12655

Nothing in the core file been changed and the only thing that been added is a module (Full Page Cache) which the developers are claiming isn't do with their plugin as they disabled it then tested it.

I'm using Magento ver.

  • You should not need to make any changes whatsoever to the core, there is something in your setup. Try disabling all third party modules and custom code and check the compiler. If you have previously done an upgrade it becomes more complex.
    – user2935
    Sep 3, 2014 at 12:30
  • It's pretty common for the Compiler to crap out when third party modules are installed. Also, given a lot of code optimization has been done over the version upgrades, Magento versions after 1.6 don't necessarily see much improvement in speed with compilation, so if the module function's more important than the compiler, ditch using the compiler. Oct 12, 2014 at 23:58

2 Answers 2


Please don't modify the autoloader :|

It's hard to tell what exactly is going on but it looks like you have a class rewrite conflicts. You can check if that is the case with magerun

cd to your Magento folder and run n98-magerun.phar dev:module:rewrite:conflicts

You should also ditch the compiler in favor of APC or OPcache.


Try to make changes in /lib/Varien/Autoload.php:



  • I want to avoid entering the core files if possible, but I was unable to find this line
    – lee murphy
    Sep 4, 2014 at 14:35
  • Look at [magento root directory]/lib/Varien/Autoload.php, anyway this line should be exists there. Also you can rewrite this file in local pool, i.e. copy it to app/code/local/Varien/Autoload.php.
    – user13804
    Sep 4, 2014 at 14:42
  • Thanks for the further information. I added it to the local pool and cleared the cache and rerun the compilation but it's still the same issue.
    – lee murphy
    Sep 4, 2014 at 15:17
  • Try to disable all custom modules and recompile again. Also, please, specify your version.
    – user13804
    Sep 4, 2014 at 15:24
  • Updated Question to include version
    – lee murphy
    Sep 4, 2014 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.