php返回500错误但没有错误日志 [英] php return 500 error but no error log
问题描述
当我的 php 应用程序返回内部服务器错误 (500) 但错误日志中没有显示任何内容时,我遇到了问题.
I am having an issue when I have a php application that is returning an internal server error (500) however nothing is showing up in the error log.
现在我知道我正在尝试运行的内容有错误,我知道我丢失了一些文件,但有些东西应该显示在 apache 错误日志中(否则我应该如何确切地知道我丢失了什么).
Now I know there are error with what I am trying to run, I know I have missing some files and what not but something should show in the apache error log (otherwise how are I supposed to know exactly what I am missing).
我创建了一个测试脚本,在相同的 vhost 配置下出现错误,这些错误显示正常,因此就 php/apache 而言,一切似乎都配置正确.错误日志中是否显示某些 php 错误(php 配置为显示任何类型的通知、警告、错误、致命错误等...)?
I created a test script is errors it in under the same vhost configuration and those error show up fine so everything seems configured right as far as php/apache. Are there certain php errors that does show up in the error log (php is configure to display any type of notice, warning, , error, fatal error, etc...)?
这是在 ubunut 10.04 上运行的,标准的 apache 和 php 来自带有 apt-get 的 ubuntu 存储库.
This is running on ubunut 10.04 with the standard apache and php from the ubuntu repo with apt-get.
推荐答案
扫描您的源文件以找到 @
.
Scan your source files to find @
.
目前@"错误控制运算符前缀甚至会禁用将终止脚本的严重错误的错误报告执行.除此之外,这意味着如果您使用@"来抑制某个函数的错误,或者它不可用或者被打错了,脚本会死在那里,没有说明原因.
Currently the "@" error-control operator prefix will even disable error reporting for critical errors that will terminate script execution. Among other things, this means that if you use "@" to suppress errors from a certain function and either it isn't available or has been mistyped, the script will die right there with no indication as to why.
这篇关于php返回500错误但没有错误日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!