I have a number of Magento sites running on Amazon and I have to turn off APC or I will get blank pages in the Magento Admin area. It only happens in admin.

Does anyone else have APC issues with Magento Admin?

Is there a work around for this?


 php -v
PHP 5.4.45 (cli) (built: Sep 11 2015 21:23:18) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

APC version 3.1.15-dev

Just an interesting update: We received an error this morning from a Nexcess server

When these show up, it is very often an issue with apc opcode caching. Sometimes, for as yet unknown reasons, magento with not play nice with this php feature. some compiled php code will get saved in it, but the next time that part of the code is needed, what is cached is not compatible and the php process dies.

To test this after getting random errors at various parts of the checkout process, I restarted php-fpm, which clears out the apc opcode cache, and I stopped getting the errors. But since it looks like this was also restarted last night, the issues will likely return if this was the cause. I can disable apc opcode caching for your setup, which will very likely clear this up. Would you like me to disable apc opcode caching in php?

  • What version of PHP? If PHP 5.4 or higher, try using OpCode Caching instead of APC and see if that works. We've seen issues with APC and older php versions, especially with too low memory allocated to apc and/or fragmentation. Feb 25, 2016 at 20:48
  • Please provide your version of php, APC (APCu) and proofread your question before sending, as I dont think you turn off AWS
    – Flyingmana
    Feb 25, 2016 at 20:55
  • I updated the post and added comments from an error this morning on Nexcess. Feb 26, 2016 at 14:35
  • Not sure why this was downvoted... No one cares about APC + Magento? Irelavant? Feb 26, 2016 at 16:00

3 Answers 3


Apparently there are some memory issues with the later versions of APC (https://stackoverflow.com/questions/9611676/is-apc-compatible-with-php-5-4-or-php-5-5). I don't know if this is actually affecting you as I've not seen this behavior. In whatever event, the best option would be to upgrade to the opcache as Rob stated.


I'm not one to quickly discredit older software, in regards to APC and Apache. Everyone always likes new shiney things. APC is still widely used. even with PHP coming with its on opcode cache, Imo. With that said, remember APC has two different caches, one for web and one for shell. So if you are trying to purge via CLI it's not clearing both. Inchoo has a a APC module to add an extra button in the admin to refresh/flush it. I'd recommend dropping in the APC.php file that comes with the package to get more insight, just be sure to secure it if it's a production box especially. Also, AOE_ClassPathCache is also good to use in conjunction with an OpCode, and disabling allowoveride in your apache setup (if you are using it.) and combine to one master .htaccess-include file you can put in to include directly. We all know how many folders/files Magento has, combined with 4 code pools, is a whole lotta I/O.


This Problem can not exist, as no supported version of PHP has support for APC. So you are either on a quite old PHP setup, where you are especially in need of a competent Sysadmin, or you dont have any Sysadmin with knowledge about PHP at all.

In both cases, go! get a competent Sysadmin, or go to someone who actually knows about hosting stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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