[英]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: 我正在CentOS 7上的Apache 2.4上使用PHP 5.5.27安装。Opcache在
phpinfo()
页面上显示为:
Opcode Caching: Disabled
操作码缓存:已禁用
Yet below opcache.enable
shows 'On'. 但是在
opcache.enable
下面显示“ 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. 我验证使用的是正确的
php.ini
( /etc/php.d/opcache.ini
),它表明它已在已加载的配置文件列表中上方加载。 I tried replacing zend_extension=opcache.so
with the full path to the file, but that didn't work either. 我尝试用文件的完整路径替换
zend_extension=opcache.so
,但这也不起作用。 I even restarted apache after each of the changes. 每次更改后,我什至都重新启动了Apache。
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
. 结果我发现我
zend_extension=opcache.so
在我/etc/php.ini
文件,以及在/etc/php.d/opcache.ini
。 Removing it from /etc/php.ini
fixed the issue. 从
/etc/php.ini
删除它可以解决此问题。 Guessing that either it couldn't find the path, or didn't like that it was listed twice. 猜测它找不到路径,或者不喜欢它被列出两次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.