I have some very simple Ubuntu server setups with NGINX passing requests for PHP files via PHP-FPM.
However, on two different servers, I've had the situation where http requests from browsers are being served old versions of the PHP files, missing updates to the PHP scripts that have been uploaded to the server.
In both cases, through trial and error, I found that only restarting PHP-FPM solves the problem. Once PHP-FPM is restarted, the new files are served. Until that point, only old files are served.
e.g. I go to mysite.com and see "Hello". I go to my server and edit index.php to say "Hello World" and save it. I clear my browser cache and go back to mysite.com and still see "Hello". I restart PHP-FPM and now I see "Hello World".
Can anyone explain why? I didn't think PHP-FPM did any internal caching, so why would it keep serving the content of old files which no longer exist in that form on the server?
opcache.enable
setting 0 or 1?0
and let me know. php.net/manual/en/opcache.configuration.phpopcache.enable setting
to0
fix it?opcache.enable
to0
fixed it.