php - 如果 opcache 是打开的,为什么我的新代码即使没有任何 php-fpm 重启也能工作?

标签 php laravel ubuntu fpm opcache

关闭。这个问题需要debugging details .它目前不接受答案。












编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将帮助其他人回答问题。


2年前关闭。







Improve this question




有人帮忙吗?当我启用opcache时,我不应该在每次更新代码时重新启动php-fpm吗?我没有重新启动它,但我的新代码正在立即运行。

这是我的 opcache 设置:https://ibb.co/rkvTcyk

谢谢

最佳答案

你有 opcache.validate_timestamps启用。从文档:

opcache.validate_timestamps boolean

If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() or by restarting the Web server for changes to the filesystem to take effect.


正如你有一个 opcache.revalidate_freq2您的服务器将每 2 秒检查一次文件的更新。

关于php - 如果 opcache 是打开的,为什么我的新代码即使没有任何 php-fpm 重启也能工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58335163/

相关文章:

php - 通过php脚本传递cmd命令

php - 主机名上的 preg_match

php - 如何使用多列索引优化 MySQL 查询?

php - 我的路线返回 404,我该如何修复它们?

php - Sql 正确过滤字符串列中的浮点值

php - redis pub/sub 订阅返回连接错误

php - 没有找到合适的服务器 (`serverSelectionTryOnce` 集): [connection refused calling ismaster on '127 .0.0.1:27017' ]

ubuntu - 您可以使用 gzip 压缩您在终端中键入的文本吗?

ubuntu - 将 FreeSWITCH 注册到 X-Lite 时不断收到错误 408

linux - 安装 Ubuntu 然后在其上安装桌面 KDE 或直接安装 kubuntu 有什么区别?