定时生成静态的PHP代码出错了,急!!!!!!!!

yihong02 2010-12-01 06:11:17
大伙帮我看一下,以下的这段代码是每五分钟自动对首页进行生成静态,可是执时时为何提示:
FastCGI Error
The FastCGI Handler was unable to process the request.
--------------------------------------------------------------------------------

Error Details:

The FastCGI process exceeded configured activity timeout
Error Number: 258 (0x80070102).
Error Description: µÈ´ýµÄ²Ù×÷¹ýʱ¡£
HTTP Error 500 - Server Error.
Internet Information Services (IIS)




代码如下:
<?php
ignore_user_abort();
set_time_limit(0);
$interval=60*5;
$filename="index.html";
do{
$fp=fopen("http://www.baidu.com","r");
$fcontents=file_get_contents("http://www.baidu.com");
$file=fopen($filename,'w');
fwrite($file,$fcontents);
fclose($fp);
fclose($file);
sleep($interval);
}while(true);
?>
...全文
55 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yihong02 2010-12-02
  • 打赏
  • 举报
回复
不是的,该服务器环境没有问题,一直运行PHP平台好好的;

只是我在执行该段代码的时候,出现错误而以!
kkbac 2010-12-01
  • 打赏
  • 举报
回复
windows下IIS + FastCgi PHP的模式运行出现如下的错误提示:“The FastCGI process exceeded configured request timeout”,几经试验,明白了需要修改 FastCgi的配置文件“fcgiext.ini”,位于目录“C:\WINDOWS\system32\inetsrv”下。
在“fcgiext.ini”最末php的配置内容下增加一些参数,如下:
[Types]
php=PHP
[PHP]
ExePath=C:\PHP\php-cgi.exe
InstanceMaxRequests=10000
EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000
RequestTimeout=500
ActivityTimeout=900
如果遇到的是“FastCGI process exceeded configured activity timeout ”的错误,也是这样解决。

2,100

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧