I have a Ubuntu and a centos server. On the centos server, whenever I change php files, they reflect immediately, but on Ubuntu, I have to restart php-fpm to make them reflect.
I didn't find anything relevant.
Anyone has similar experience?
opcache.enable=1
, somewhere in your php config maybe (/etc/php5/fpm/conf.d/) ?In a temporary php file, put something like this (don't forget to remove it afterward):
<?php
phpinfo();
On recent PHP version (5.5+), search for Zend OPcache
section and see if it's active or not
It might be enabled in .
If so, take a look to opcache doc to configure it properly (according the dic, opcache.revalidate_freq to 0 for a check on each request).
https://php.net/manual/fr/opcache.configuration.php#ini.opcache.revalidate-freq
Another cause might be php apc (for php 5.4 and lower).
My search for same thing landed me here. Opcache is enabled. And for the setting mentioned in above link to (not English) PHP docs, I only caught that "0 will result in OPcache checking for updates on every request. "
However, I didn't initially catch the next line. So, in an effort to save others a few extra minutes, here's the info:
You'll need to edit these two settings in your either your php.ini or ext-NN-opcache.ini (auto include) and then restart php-fpm with service php-fpm restart
in order to see changes.
; after how many seconds should code/file be checked for changes (expire)
opcache.revalidate_freq=5
; If this is off, the above does not matter. won't be checked. (no expire)
opcache.validate_timestamps=1
Here's the English version link: https://secure.php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With