简体   繁体   中英

Disabling opcache.enable in php.ini not working on CentOS

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-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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM