简体   繁体   English

PHP 5.6 opcache未在Mac Sierra中显示

[英]Php 5.6 opcache not showing up in Mac Sierra

I've made the possible changes to the php.in at /etc/php.ini. 我已经对/etc/php.ini中的php.in进行了可能的更改。 I didn't had php.ini so took a copy of php.ini.default. 我没有php.ini,所以复制了php.ini.default。 The changes I've made are 我所做的更改是

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=64

When I print phpinfo() and see the result, I tried to find opcache and it is not showing up. 当我打印phpinfo()并看到结果时,我试图找到opcache,但它没有出现。 I'm using Mac Sierra. 我正在使用Mac Sierra。

Make sure you have edited the correct php.ini (it can be seen in the phpinfo() result). 确保您编辑了正确的php.ini(可以在phpinfo()结果中看到)。 Check, if the files listed in "Additional ini files parsed" does not override your settings. 检查“解析的其他ini文件”中列出的文件是否不覆盖您的设置。 (eg: opcache.enable=0 somewhere override your php.ini setting) (例如:opcache.enable = 0会覆盖您的php.ini设置)

If you are using PHP-FPM, that need a restart / reload to pick up the changes. 如果您使用的是PHP-FPM,则需要重新启动/重新加载以获取更改。

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

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