Enabling PHP7 Opcache(启用 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
并创建目录(以 root 身份)
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
如何让 PHP 7 Opcache 与 WordPress 一起以最佳性能运行?
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:启用 PHP7 Opcache
基础教程推荐
- PHP 类:全局变量作为类中的属性 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
