4

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

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

4

2 回答 2

5

在您的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,你就完成了。

于 2012-06-27T12:17:22.517 回答
2

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

于 2012-06-27T12:16:23.357 回答