I'm sure it's something obvious, but I'm pretty stuck here. I have a LAMP server (Centos 5.3, PHP 5.3.8) which has been working no problem. I modified and re-uploaded (via SFTP) a particular PHP script to the server, but when I reloaded the page the old script still runs. I can see that the new file is there and that the timestamp and size match the new version, but it always outputs as if the file was unchanged. I even tried replacing it with a simple
<?php die('test'); ?>
test file, same result. It's not a browser cache problem (reloading, different browsers, etc all show the old script, and I can pass
$_GET variables in and it runs as the old script). If I rename the file it renders correctly (with the new changes) under the new name and the system correctly throws a 404 error at the original location. When I return it to the original filename it reverts to rendering as the old version. I figured it was an e-accelerator issue (running 0.9.6.1) so I cleared the cache (emptied
/var/cache/php-eaccelerator) and restarted the server but no dice.
Is there anything else that might be causing the server to cache the old script?
EDIT - SOLUTION!
OK, unsurprisingly, this ended up being an application-specific problem that I should have figured out sooner. The application was set up with a "custom-override" system that was causing the issue... basically to make updating easy but also allow for customization by clients, the system was set up with a special
/custom/ folder which clones the folder structure of the base application. Before serving, Apache apparently checks for an identically located file in the custom structure and serves it instead if it exists. Basically there was a custom script uploaded to the relevant directory which was overriding any file I uploaded into the main application directory. Apparently there was an overriding script loaded into the custom directory.
@Dagon, thanks for the suggestion to disable eAccelerator. I was so convinced that it was the source of my problem that I didn't bother to check
.htaccess. Once I ruled that out I started thinking more clearly.