当ignore_repeated_errors = On时,PHP日志不会忽略重复的错误

发布于 2024-08-16 06:56:08 字数 79 浏览 3 评论 0原文

尽管我已指示 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鱼忆七猫命九 2024-08-23 06:56:08

该指令只会阻止在同一脚本运行中再次记录错误。当同一脚本多次运行时,您每次仍然会看到该错误。

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.

花落人断肠 2024-08-23 06:56:08

除了 ignore_repeated_errors 之外,还有 ignore_repeated_source ini 设置。我认为一个对你有用,并且当一遍又一遍地调用同一个文件时应该停止重复显示相同的错误。

正如 PHP 手册 此处 所说:

ignore_repeated_source - 忽略重复消息时忽略消息来源。当这个
设置为“开”时,您将不会记录来自重复消息的错误
不同的文件或源代码

Besides the ignore_repeated_errors, there is also the ignore_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:

ignore_repeated_source - Ignore source of message when ignoring repeated messages. When this
setting is On you will not log errors with repeated messages from
different files or sourcelines

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文