奇怪的500内部服务器错误(萤火虫,PHP的display_errors,AJAX) [英] Weird 500 Internal Server Error (firebug, php, display_errors, ajax)

查看:161
本文介绍了奇怪的500内部服务器错误(萤火虫,PHP的display_errors,AJAX)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,在一个页面上我做多个AJAX调用。所有来电成功返回反应,但最后一个(不涉及其他ajax调用)返回500内部服务器错误作为响应code(如萤火虫告诉)。然而,尽管错误code的,正确的内容是从AJAX调用返回。

Guys, on one page I am doing multiple AJAX calls. All calls return responses successfully but the last one (not related to other ajax calls) returns 500 internal server error as response code (as firebug tells). However, in spite of error code, correct content is returned from that AJAX call.

要我惊讶的是,当我在php.ini中设为ON的display_errors选项,错误消失和响应在呈现在页面上。我有安装错误记录到文件,但会记录没有错误对应于上述内部服务器错误。

To my amazement, when I set display_errors option in php.ini as On, the error disappears and response in rendered on the page. I have setup error logging to a file but no error is logged corresponding to the above mentioned internal server error.

顺便说一句,我使用Apache,JQuery的,PHP5,APC(如果适用)。

By the way, I am using Apache, JQuery, PHP5, APC (if it is relevant).

推荐答案

最有可能的答案,由于资料有限,是PHP是达到了一个致命的错误 ,它已经完成回送你的预期后,输出。

The most likely answer, given the limited information available, is that PHP is reaching a fatal error after it has finished echoing your expected output.

要测试:在被最后执行的行,呼应东西。如果回波显示不出来,那么你知道你的PHP脚本在某处停止。在这一点上,它只是一个调试和跟踪的问题。

To test: in the line that gets executed last, echo something. If that echo doesn't show up, then you know that your PHP script is halting somewhere. At that point, it's just a matter of debugging and tracing.

这篇关于奇怪的500内部服务器错误(萤火虫,PHP的display_errors,AJAX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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