gpt4 book ai didi

php - 如何在 MAC Sierra (MAMP) 上为 PHP7.1 启用 OPCache

转载 作者:行者123 更新时间:2023-12-03 17:38:20 25 4
gpt4 key购买 nike

我已经从 GitHub 安装了 OPCache GUI并安装在我的 Mac 上。但是当我运行页面时,它显示

The Zend OPcache extension is installed but not turned on



我已经使用这些在我的 php.ini 文件中启用了 OPCache

opcache.enable=1
opcache.enable_cli=1
zend_extension=opcache.so
opcache.memory_consumption=128
opcache.max_accelerated_files=2500
opcache.interned_strings_buffer=8
opcache.revalidate_freq=60
opcache.fast_shutdown=1
zend_extension=/path/to/opcache.so/file



请帮忙!

最佳答案

我发现无论你在 php.ini 中设置了什么缓存始终显示为禁用。唯一有效的方法是激活 OPcache直接在 MAMP GUI 中。
您在何处找到这些设置取决于 MAMP 变体(标准版或专业版):
MAMP专业版

Language → PHP Settings → Cache module to speed up PHP execution → OPcache


enter image description here
MAMP

Settings → General → Cache → OPcache


enter image description here

关于php - 如何在 MAC Sierra (MAMP) 上为 PHP7.1 启用 OPCache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42724120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com