启用PHP7 Opcache [英] Enabling PHP7 Opcache

查看:112
本文介绍了启用PHP7 Opcache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到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可以对其进行写入.

update The 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆