问题描述
我最近升级到PHP 7.
I recently upgraded to PHP 7.
我把它放在/etc/php.d/opcache.ini
I placed this in /etc/php.d/opcache.ini
opcache.file_cache = /var/www/html/.opcache
opcache.file_cache_only = 1
并创建目录(作为根目录)
and created the directory (as root)
当我访问该网站时,.opcache文件夹中没有任何创建内容
When I visit the site there is nothing created in the .opcache folder
a phpinfo();
反映了我在opcache.ini中所做的更改
a phpinfo();
reflects the changes I made in opcache.ini
如何使WordPress能够以最佳性能运行PHP 7 Opcache?
How can I get PHP 7 Opcache working at optimal performance with WordPress?
更新问题出在女巫文件夹权限上. 请确保Apache可以对其进行写入.
updateThe problem was witch folder permissions. 'Ale sure the Apache can write to it.
最适合的设置是什么?安全和速度明智吗?
What are the optimal settings for it? Security and speed wise?
推荐答案
我通过确保apache可以写入我创建的文件夹来解决此问题.完成此操作后,重新启动httpd即可正常工作.
I fixed this by making sure apache get write to the folders I created. Once that was done restarting httpd made it work.
这篇关于启用PHP7 Opcache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!