PHP致命错误不在Error_Log中,如何启用?
由于某种原因,致命错误没有出现在我的服务器的error_log中,并且我似乎无法启用此级别的日志记录。然而,标准错误、php警告和php通知都会被记录下来。
日志文件:/var/www/vhost/sitename/statistics/logs/error_log
我已经检查过我的 php.ini
、httpd.conf
和.htaccess
和错误报告设置为 E_ALL
,但我一定错过了启用致命错误日志记录的某些内容。
php 配置是:
display_errors On (Off)
display_startup_errors On (Off)
error_append_string no value (no value)
error_log no value (no value)
error_prepend_string no value (no value)
error_reporting 2047
html_errors On (Off)
ignore_repeated_errors Off
log_errors On (On)
log_errors_max_len 1024
track_errors Off
xmlrpc_error_number 0 (0)
xmlrpc_errors Off
有谁知道设置可能有什么问题吗? php致命错误这个问题一定有原因吧?
For some reason fatal errors do not appear in my server's error_log and I cannot seem to enable this level of logging. Standard errors, php warnings and php notices however are all logged.
Logfile: /var/www/vhost/sitename/statistics/logs/error_log
I have checked through my php.ini
, httpd.conf
and .htaccess
and error reporting is set to E_ALL
, but I must have missed something to enable fatal error logging.
The php config is:
display_errors On (Off)
display_startup_errors On (Off)
error_append_string no value (no value)
error_log no value (no value)
error_prepend_string no value (no value)
error_reporting 2047
html_errors On (Off)
ignore_repeated_errors Off
log_errors On (On)
log_errors_max_len 1024
track_errors Off
xmlrpc_error_number 0 (0)
xmlrpc_errors Off
Does anyone know what could be wrong with the setup please? There must be a reason for this problem with php fatal errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试在您的脚本中使用
,或者,如果您想禁止通知,请使用
Try to use
in your script, or, if you want to suppress notices, use
尝试下一个命令
它将显示有关您的 php 配置的信息,您可以检查它是否正确。
Try the next command
It will show info about your php configuration and you can check if it is correct.
几年来我遇到了完全相同的问题。
我可以解决这个问题的唯一方法是暂时启用 display_errors ;-/
I'm having the exact same problem for a few years now.
The only way I can even work around it is to temporarily enable display_errors ;-/