当ignore_repeated_errors = On时,PHP日志不会忽略重复的错误
尽管我已指示 php 仅记录一次错误 - 我在日志文件中一遍又一遍地看到该错误。有什么想法为什么这个指令会被忽略吗?我重新启动了apache等。
Although I have instructed php to only log an error once - i see the error over and over again in my log file. Any ideas why this directive would get ignored? I've restarted apache, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该指令只会阻止在同一脚本运行中再次记录错误。当同一脚本多次运行时,您每次仍然会看到该错误。
This directive will only stop the error from being logged again within the same script run. When the same script is run multiple times, you will still see that error every time.
除了
ignore_repeated_errors
之外,还有ignore_repeated_source
ini 设置。我认为一个对你有用,并且当一遍又一遍地调用同一个文件时应该停止重复显示相同的错误。正如 PHP 手册 此处 所说:
Besides the
ignore_repeated_errors
, there is also theignore_repeated_source
ini settings. I think that one would work for you and should stop showing the same error repeatedly, when same file is called over and over.As PHP manual here says for it: