Enable PHP 5.5 OPCache

隐身守侯 提交于 2019-12-01 22:12:24

问题


After configuring OPCache as recomanded, It's not working.

So, How to debug OPCache to see where is the problem?

Or I am missing something?

My config:

php.ini

php -v

And in code

opcache_get_status(); // return false
//but
extension_loaded('Zend OPcache') // return true

回答1:


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

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



回答2:


I had same problem. I have edited php.ini file in C:\wamp\bin\apache\apache2.4.17\bin location and problem solved. however before I edited php.ini in C:\wamp\bin\php\php5.6.15 path. at all you should edit php.ini file in C:\wamp\bin\apache\apache2.4.17\bin path. I am enjoying speed of OPCache!



来源:https://stackoverflow.com/questions/28899673/enable-php-5-5-opcache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!