脚本在返回标题之前超时:php.fastcgi

问题描述 投票:4回答:2

大约90秒后,我在apache错误日志中看到此错误。我在讨论我需要增加PHP中的设置,但我不确定要改变哪一个。

我可以增加一个设置来清除此错误吗?

php performance fastcgi
2个回答
3
投票

在你的php.ini文件中找到类似这样的文件:

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 600    

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts. 
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 600

编辑值,重启apache,就完成了。


2
投票

您可以在PHP脚本中调用set_time_limit(0);无限期限。

© www.soinside.com 2019 - 2024. All rights reserved.