Apache的500错误用PHP乐趣

Apache的500错误用PHP乐趣

本文介绍了Apache的500错误用PHP乐趣的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

所以我在我的godaddy运行的PHP脚本(不恨我),这我期待花费大约5分钟即可完成执行虚拟服务器。剧本是卷曲的网页,但在时间从来不会持有超过1页(它是在一个循环中完成,重复使用相同的变量)。
我修改了php5.ini文件为以下内容:

So I am running a PHP script on my godaddy (don't hate me) virtual server which I am expecting to take around 5 minutes to finish executing. The script is CURLing pages but never holds more than 1 page at a time (it is done in a loop reusing the same variable).I modified my php5.ini file to the following:

max_execution_time = 600
max_input_time = 120
memory_limit = 64M

我通过的phpinfo的ini文件中的变化已经生效核实,但我后120秒获得一个Apache 500错误。以下是错误日志这段时间:

I verified through phpinfo that the ini file changes had taken effect, however I am getting an Apache 500 error after 120 seconds. Here is the error log for this time:

[Wed Jul 11 22:08:52 2012] [warn] [client **.**.**.***] mod_fcgid: read data timeout in   120 seconds
[Wed Jul 11 22:08:52 2012] [error] [client **.**.**.***] Premature end of script headers: test.php

如果任何人有,为什么我可能会得到这些错误或事物任何建议的任何想法去尝试我会AP preciate的帮助。我也注意到设定在120 PHP的设置选项,但我不知道这是否会产生效果:realpath_cache_tt

If anyone has any ideas on why I might be getting these errors or any suggestion on things to try I would appreciate the help. I did notice an option in the php settings set at 120, but I'm not sure if it would have an effect: realpath_cache_tt

我还设置了PHP文件时间限制:参数或者set_time_limit(600);

I also set a time limit in the .php file: set_time_limit( 600 );

先谢谢了。

更新:
以下是我在.htaccess文件中尝试:

UPDATE:Here is what I tried in the .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
<IfModule mod_fcgid.c>
IPCCommTimeout  7200
</IfModule>

原因在任何页面加载一个Apache 500错误。
我也被禁止FastCGI的,但问题仍然存在的。

The causes an Apache 500 error on any page load.I also disabled FastCGI but the issue is still occuring.

议决
罗布建议如下:
    
      IPCCommTimeout 7200
    
里面应该有工作但是由于我的GoDaddy的共享主机这是不允许的。时间去寻找新的托管服务。

RESOLVEDRobB suggested the following: IPCCommTimeout 7200Which should have worked however due to my godaddy shared hosting it is not allowed. Time to find a new hosting service.

推荐答案

我不知道的这个问题上GoDaddy的,但正常的分辨率处理情况如下:

I'm not sure of the handling with this issue on GoDaddy but the normal resolution would be as follows:

这是您所遇到的问题是由于执行PHP脚本的FastCGI,但它不生成默认IO超时(120秒),这会导致500内部服务器错误中的一个响应。

The issue that you are experiencing is due to FastCGI executing a PHP script but it doesn't generate a response within the default IO timeout (120 seconds), which results in the 500 Internal Server Error.

尝试编辑默认的虚拟主机的conf文件,通常位于的/ etc / apache2的/网站的可用/默认并添加&LT内部此指令;虚拟主机&GT; 背景:

Try editing the default VirtualHost conf file, typically located at /etc/apache2/sites-available/default and add this directive inside the <VirtualHost> context:

<IfModule mod_fcgid.c>
   IPCCommTimeout  7200
</IfModule>

保存修改后,重新启动的Apache2用这个命令:须藤/etc/init.d/apache2重启

从我已经能够从GoDaddy的判断是,最大时间限制是共享主机120秒PHP / FastCGI的,它不能增加客户端。我会建议他们联系援助的支持,并希望他们的声誉将不会投放起来,你就可以得到帮助。

From what I've been able to determine from GoDaddy is that the maximum time limit is 120 seconds for PHP/FastCGI in shared hosting, which can not be increased by the client. I would suggest contacting their support for assistance and hopefully their reputation won't serve up and you'll be able to get help.

更新:
不知道这是否会帮助,但你可以尝试在您的主机控制中心(设置>文件扩展名> PHP5)从FastCGI的改变到PHP5。

Update:Not sure if it will help but you could try changing from FastCGI to PHP5 in your hosting control center (Settings > File Extension > php5).

这篇关于Apache的500错误用PHP乐趣的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 08:52