简体   繁体   English

启用PHP 5.5 OPCache

[英]Enable PHP 5.5 OPCache

After configuring OPCache as recomanded , It's not working. 将OPCache配置为recomanded后 ,它无法正常工作。

So, How to debug OPCache to see where is the problem? 那么,如何调试OPCache以查看问题所在?

Or I am missing something? 或者我错过了什么?

My config: 我的配置:

php.ini php.ini中 在此输入图像描述

php -v php -v 在此输入图像描述

在此输入图像描述

And in code 在代码中

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

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... 注意到你正在运行Xdebug ......

Have you checked your php.ini to make sure that the following is not an issue? 你检查过你的php.ini以确保以下不是问题吗?

If you want to use OPcache with » Xdebug, you must load OPcache before Xdebug.

http://php.net/manual/en/opcache.installation.php 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

I had same problem. 我有同样的问题。 I have edited php.ini file in C:\\wamp\\bin\\apache\\apache2.4.17\\bin location and problem solved. 我在C:\\wamp\\bin\\apache\\apache2.4.17\\bin位置编辑了php.ini文件并解决了问题。 however before I edited php.ini in C:\\wamp\\bin\\php\\php5.6.15 path. 然而,在我在C:\\wamp\\bin\\php\\php5.6.15路径中编辑php.ini之前。 at all you should edit php.ini file in C:\\wamp\\bin\\apache\\apache2.4.17\\bin path. 你应该在C:\\wamp\\bin\\apache\\apache2.4.17\\bin路径中编辑php.ini文件。 I am enjoying speed of OPCache! 我很享受OPCache的速度!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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