I have inherited a Magento site (v, now running on my VPS. I use APC for all php sites on the server, with no problems. Like my other php sites, I expected to see entries in the System cache for my Magento site, but there are none.

I have tried adding the following to my local.xml file:


With this setting, I do see entries in the APC User cache. However, APC should work as opcode cache, no matter what cache is specified in local.xml. Is this correct, or is there some special about Magento that would cause it not to use the opcode cache?

Below is my APC config. I realise that "cache_by_default" is set to 0 - I add "php_flag apc.cache_by_default On" to the VirtualHost settings for sites where I want to use apc, including this one.

apc config

Thanks in advance for any assistance.

1 Answer 1


The answer was in the question. The .htaccess file had

 php_flag apc.cache_by_default Off

which was overriding my config setting in the apache config.

  • You should mark your own answer as accepted so that the question shows up as solved. Apr 8, 2015 at 18:09

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.