Unless you have custom compiled or otherwise installed and configured the Zend OPcache extension for PHP, or are running PHP >= 5.5 in which case the extension is enabled by default.
This is simple, yet handy if you are developing within an environment where you want to test code with and without OPcache. In the .htaccess file of the directory containing the PHP you do not want cached, add the line:
php_flag opcache.enable Off
No need to restart Apache. To determine the state of OP caching within this directory, examine the output of phpinfo() executed from within that directory. Look for the section titled ‘Zend OPcache’, if it’s enabled you’ll get a good deal of stats on the items in the cache, if it’s not it will simple say ‘Disabled’.
Troubleshooting:
- Check .htaccess override setting in httpd.conf