服务器X带回200响应,服务器Y抛出和内部服务器错误 [英] server X brings back 200 response, Server Y throws and Internal server error

查看:145
本文介绍了服务器X带回200响应,服务器Y抛出和内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在建立CURL阅读器时遇到问题(请参阅:脚本头的过早结束:php-cgi - 运行CURL脚本时

I'm having an issue with a CURL reader I built (see: Premature end of script headers: php-cgi -- While running a CURL script)

检查我的问题服务器是否会说到feed,所以我在本地测试下面的代码,它工作,在服务器上测试,并得到一个内部服务器错误。我失去了这里,我应该如何调试这个作为主机公司不是非常有帮助。

The guy said to check if my problem server will speak to the feed, so I tested the below code locally and it works, tested in on the server and got an internal server error. I am lost here, how should I go about debug this as the host company are not being very helpful at all.

代码:

$url = 'http://www.energydigger.com/feeds/headlines.xml';
list($status) = get_headers($url);
if (strpos($status, '200') !== FALSE) {
   echo 'boom';
}

问题服务器响应:
内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求。
请与服务器管理员root @ localhost联系,并通知他们错误发生的时间,以及可能导致错误的任何操作。
有关此错误的详细信息可能在服务器错误日志中提供。

我从他们提供的日志中获得的所有信息都是:

all i am getting from the log they provide is:

[Wed Apr 24 20:36:01 2013] [warn] mod_fcgid: read data timeout in 60 seconds
[Wed Apr 24 20:36:01 2013] [error] [client 151.227.255.54] Premature end of script headers: php-cgi


$

推荐答案

任何建议都值得赞赏,因为我现在有点困惑。我可以重现它。但我的环境使用mod_fcgid不是简单的cgi。确保所有者和组与执行cgi用户相同。或者为了简单起见,您的web目录中的所有其他文件。

Maybe I could reproduce it. But my environment uses mod_fcgid not simple cgi. Make sure the owner and group are the same as for the executing cgi user. Or for simplicity as all the other files in your webdirectory.

这篇关于服务器X带回200响应,服务器Y抛出和内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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