我研究了较旧的问题
https://craftcms.stackexchange.com/questions/4661/fastcgi-error-when-accessing-a-local-development-site-using-mamp-pro/6573#6573?newreg=aa4ad11b453f4c7f93882ce478d837a3 https://craftcms.stackexchange.com/questions/4661/fastcgi-error-when-accessing-a-local-development-site-using-mamp-pro/6573#6573?newreg=aa4ad11b453f4c7f93882ce478d837a3
如何增加 MAMP / MAMP Pro 上的 apache fastCGI 超时? https://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009
但我的配置有很大不同,因为我使用的是 MAMP Pro 4 并且运行着多个 PHP 版本
我尝试编辑 MAMP/fcg-bin/phpx.x.x.fcgi 并添加 -idle-timeout 3600,因为它看起来更干净一些
#!/bin/sh
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=200
exec /Applications/MAMP/bin/php/php5.4.45/bin/php-cgi -c "/Library/Application Support/appsolute/MAMP PRO/conf/php5.4.45.ini" -idle-timeout 3600
并且
#!/bin/sh
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=200
exec /Applications/MAMP/bin/php/php5.6.30/bin/php-cgi -c "/Library/Application Support/appsolute/MAMP PRO/conf/php5.6.30.ini" -idle-timeout 3600
但它似乎没有任何效果我仍然得到同样的错误
FastCGI:与服务器“/Applications/MAMP/fcgi-bin/php5.6.30.fcgi”的通信已中止:空闲超时(30 秒)
我还尝试编辑 apache > httpd.conf
#MAMP_FastCgiServer_MAMP
FastCgiServer /Applications/MAMP/fcgi-bin/php5.4.45.fcgi -idle-timeout 2400
FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.30.fcgi -idle-timeout 3600
在这种情况下 Apache 将无法启动