PHP Files being cached by unknown entity

apache-2.2cachephp5

I'm hitting a weird cache issue on my server, the project I am working on doesn't have any caching enabled at this time, but the server it self has APC installed (which was set to cache everything by default, this has been disabled now).

The problem is, my old code is running still, and I don't know how to get the amended code to trigger.

I have tried deleting the file entirely, this makes my project error with "missing file" as it should, but once I upload my file (new version), it starts serving up the old version of the file again.

I've uploaded a uniquely labeled file with apc_clear_cache(); and apc_clear_cache( 'opcode' ); but this didn't appear to help.

I have also commented out APC from loading with PHP, but it still served old files, so I am wondering if there's something underlying that is causing this aggressive caching.

Apache2, PHP, APC etc is all loaded up using Aptitude on Debian Wheezy

PHP 5.4.4-14+deb7u3 (running under mod_php)
Apache 2.2.22

Between each config change and disabling APC I did a complete apache restart.

I've checked the apache2 modules list, no cache modules are loaded up, there are also no services such as varnish etc running.

Update

Did some additional testing, added some html output before the <?php tag which is output, so content outside the php tags aren't being cached it seems.

The file that isn't updating is being included with include_once() and disabling APC didn't appear to have any kind of impact on the file being served incorrectly.

The problem is with tryign to use HTML2PDF to generate a .pdf file after form submission

PHP Fatal error: Uncaught ERROR File : /lib/html2pdf/html2pdf.class.php Line : 1319, Impossible to load the image 'logo.png' thrown in /lib/html2pdf/html2pdf.class.php on line 1319

The new version of the file uses logo.jpg

Best Answer

In APC, this most commonly would happen as a result of apc.stat being turned off, or stat'ing ctime instead of mtime or vice versa, depending on your SCCS. You may wish to verify that APC is truly disabled via something like phpinfo().