I disagree with this:
“Normally itâ€™s wise cache only â€œsmallâ€ files and this value is good to set example to default 1 Mb.”
Why did you say that? Caching large files is also good because you are avoiding parsing these files.
Anyway thanks for the tips :)

Let’s think very normal example, VPS servers (512Mb, 1Gb, 2Gb) where you have to limit amount of APC memory (e.g. 32Mb, 64Mb 128Mb, 256Mb), and you have hundreds of files, a lot of small files (less than 1Mb) and a few large files (like 25Mb).

Okay, you cache all files ignoring the size (set very high apc.max_file_size value), then the cache will reach maximum capacity almost constantly and it clean forcefully any entries that haven’t been accessed in the last apc.ttl seconds. This is situation where you use APC, but finally your scripts are loading much slower than without any cache, because you end up the situation where load files from disk, add files to cache and delete files from cache. Which is much heavier than just load files from disk.

The optimal situation is a situation where your cache is almost fully used, but newer reach maximum capacity (Cache full count number is always zero) and almost all incoming requests are hits (not misses).

But, if you have enough memory to get all your files cached, then it’s okay to set very high apc.max_file_size and cache everything. :)

Strange that Debian doesn’t include apc.php at all, but nice to hear that you got it working and even write helpful post to other Debian users who can’t get apc.php file from Debian’s on pakcages. Thanks!

Just came across your useful article while trying to resolve an APC problem.

It seems a little odd and I’m wondering if you or anybody here has come across this. I’ve got APC Opcode cache installed fine on a VPS and I can check its working with apc.php. However if I use a local php.ini file for a vhost APC stops running altogether no matter the contents of the php.ini file (even if blank).

Based on this information, my guess is that you are not enabled php apc at all when you are using local php.ini. What if you check your phpinfo is APC module loaded at all, when you use local php.ini? Or what if you use your global php.ini as your local config, is it working then?

So I guess that you are missing following, when you use your local php.ini:

Yes JR, as I’m running a VPS I have a core php.ini and a php.ini for each vhost and I’d assumed that the contents (of a local php.ini) would just override individual parts of the core php.ini. Turns out that the existence of a local php.ini overrides all server php.ini settings and I needed to reinclude the apc module. Thanks for taking the time to answer this and everybody elses questions.

Create a phpinfo file in your document root and access it via web browser.
Search for the option which says â€œScan this dir for additional .ini filesâ€ this contains a directory location inside which config files of various PHP modules exist.