问题描述
After configuring OPCache as recomanded, It's not working.
那么,如何调试OPCache以查看问题出在哪里?
So, How to debug OPCache to see where is the problem?
或者我缺少什么?
我的配置:
php.ini
php -v
并在代码中
opcache_get_status(); // return false
//but
extension_loaded('Zend OPcache') // return true
推荐答案
已经有一段时间了,所以我想您已经摆脱了这个问题,但是如果您没有这样做的话.注意到您正在运行Xdebug ...
It has been quite some time so I imagine you have moved on from this issue but in case you have not. Is noticed you are running Xdebug...
您是否检查过php.ini以确保以下内容不是问题?
Have you checked your php.ini to make sure that the following is not an issue?
If you want to use OPcache with » Xdebug, you must load OPcache before Xdebug.
http://php.net/manual/en/opcache.installation.php
另一件事可能值得一提的是,您无需指定共享库的路径.以下内容就足够了:
The other thing probably worth mentioning is that you do not need to specify the path to the shared library. The following should suffice:
zend_extension=opcache.so
这篇关于启用PHP 5.5 OPCache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!