美文网首页我爱编程
解决MAMP的apache日志报错:FastCGI ... id

解决MAMP的apache日志报错:FastCGI ... id

作者: misaka去年夏天 | 来源:发表于2017-08-08 13:29 被阅读0次

MAMP环境下的apache采用的环境变量配置,采用了MAMP自定义的配置。
比如:打开httpd.conf(打开界面的Edit----Edite Template----apache----httpd.conf)FastCGI相关的配置,搜索MAMP_FastCgiServer_MAMP,能看到apache采用了自定义的配置参数。

这些自定义的配置,带来了一些隐患:我在执行一个需要很长时间(约2分钟)的php脚本时,apache响应500错误,查看日志发现

[error] [client ::1] FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php7.0.8.fcgi" aborted: idle timeout (30 sec)

需要设置idle timeout的最大时间,正确的配置方法是:

#MAMP_FastCgiServer_MAMP
FastCgiServer /Applications/MAMP/fcgi-bin/php7.0.8.fcgi -idle-timeout 3600

即先注释掉MAMP的自定义项,然后添加想修改的项
重启apache,运行脚本,问题解决。

相关文章

网友评论

    本文标题:解决MAMP的apache日志报错:FastCGI ... id

    本文链接:https://www.haomeiwen.com/subject/nvjtrxtx.html