5

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?

1
  • Did you update the correct php.ini file? Most installations have at least two, one for web and a second for command line Commented Dec 24, 2014 at 18:19

1 Answer 1

5

Installing php56w-opcache creates a file named /etc/php.d/10-opcache.ini. This file contains the option opcache.enable=1 by default, and will override your settings in php.ini.

I edited that file and changed opcache.enable=1 to opcache.enable=0 then restarted Apache and now opcache is disabled.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.