PHP返回500错误,但没有错误日志 [英] php return 500 error but no error log

查看:1525
本文介绍了PHP返回500错误,但没有错误日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,当我有一个返回内部服务器错误(500),但是没有什么是显示在错误日志了PHP应用程序。

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).

我创建了一个测试脚本错误,它在同一个虚拟主机的配置和那些错误的下面显示了罚款,所以一切似乎是正确的,只要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运行从与Ubuntu的回购标准的Apache和PHP apt-get的。

This is running on ubunut 10.04 with the standard apache and php from the ubuntu repo with apt-get.

推荐答案

扫描源文件找到 @

从PHP文档网站

目前的@错误控制运算符preFIX甚至将禁用
  错误时终止脚本严重错误报告
  执行。别的不说,这意味着如果你用@来
  SUP preSS从某一函数的错误和任何它不可
  或已被错误地输入,该脚本将没有死在那里
  迹象显示原因。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆