简体   繁体   中英

PHP 5.5.27 Opcache not working on Apache 2.4 CentOS 7

I've using PHP 5.5.27 installed on Apache 2.4 on CentOS 7. Opcache is showing on a phpinfo() page as:

Opcode Caching: Disabled

Yet below opcache.enable shows 'On'. I verified the proper php.ini is being used ( /etc/php.d/opcache.ini ) and it shows that it is loading up above in the list of loaded config files. I tried replacing zend_extension=opcache.so with the full path to the file, but that didn't work either. I even restarted apache after each of the changes.

I feel like I must be missing something simple, but I have no idea what it is.

Turns out I had zend_extension=opcache.so in my /etc/php.ini file as well as in the /etc/php.d/opcache.ini . Removing it from /etc/php.ini fixed the issue. Guessing that either it couldn't find the path, or didn't like that it was listed twice.

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