I have a CentOS 7 machine with PHP 5.6 installed on it via Webtatic's php56w repo. I installed the opcache extension with yum install php56w-opcache.
Since this is a development machine, I want to turn opcache off by default, so in my /etc/php.ini file, I put the following line:
opcache.enable = 0
However, after restarting my webserver, I can see in phpinfo() the opcache.enable is still On.
Did I miss something? How can I turn the opcache off?
Installing
php56w-opcachecreates a file named /etc/php.d/10-opcache.ini. This file contains the optionopcache.enable=1by default, and will override your settings inphp.ini.I edited that file and changed
opcache.enable=1toopcache.enable=0then restarted Apache and now opcache is disabled.