Linux – lamp — edit PHP file but doesn’t change web output — including die()

apache-2.2filesystemslinuxPHP

Server is standard Linux server on Amazon Web Services. Cent OS 5/Apache/PHP 5.3. No APC.

It's worked fine for over a year, but now when I edit some but not all PHP files on the server using vi, the changes don't affect the web output.

For example, I edit myfile.php and put a die() at the top, but when I load the page in my web browser, instead of the die() I see the content that would show up if the die() weren't there. svn updating the file in question doesn't help either.

Files are on an Amazon EBS partition symlinked to /var/www/html. Just to reiterate — this has worked fine for a long time.

Restarting apache didn't help, nor did rebooting the server. What's weird is that it's just some of the files but not all. File ownership/permissions are the same for the "good" and "problem" files.

I'm not a Linux newbie but am at a complete loss with this, and couldn't find anything on Google either. Any hints would be much appreciated!

Best Answer

May this be because of some PHP op-cache usage? I've seen several time that weird situation when op-cache believes that file is the same (no change was made) so it serves the same old cached content. The same idea for Apache proxy module, check if it's on on your server?

May there also be any filesystem problems that affects webserver ability to see that file is changed?

I'd start with disabling all of webserver modules to check if any of it was the cause (maybe not all, but at lease mod_php, mod_proxy, mod_cgi, if any), then enable it one by one. Then check which PHP extensions are on and play with it.