[英]Can't enable Zend OPCache in PHP 5.6.30
I'm having trouble to enable Zend OPCache in compiled PHP 5.6.30. 我在编译的PHP 5.6.30中启用Zend OPCache时遇到了麻烦。
It was compiled using '--enable-opcache' although it's not necessary at that version. 它是使用'--enable-opcache'编译的,尽管在那个版本中没有必要。
I already added to php.ini: 我已经添加到php.ini:
zend_extension=path_to_opcache.so
opcache.enable=1
Also tried enabling opcache.error_log but didn't write anything to the specified file. 还尝试启用opcache.error_log但未向指定文件写入任何内容。
I've tried some others options, none of them showed "Zend OPCache" section at phpinfo();
我尝试了其他一些选项,没有一个在
phpinfo();
显示“Zend OPCache” 部分 phpinfo();
. 。
I'm using Ubuntu 16.04. 我正在使用Ubuntu 16.04。
It turns out that my php.ini was not where it should be. 事实证明我的php.ini不是应该的位置。 I created a symbolic link to the directory specified in
phpinfo's
Configuration File (php.ini) Path linking my php.ini, restarted php-fpm and now OPCache is enabled. 我创建了一个指向
phpinfo's
配置文件(php.ini)路径中指定目录的符号链接,链接我的php.ini,重启php-fpm,现在启用了OPCache。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.