什么定义了PHP的超时时间? [英] What defines the timeout period in PHP?

查看:199
本文介绍了什么定义了PHP的超时时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我说,我有一个Apache运行PHP。当有人一个客户请求(并没有多么),什么定义的时间客户端将等待量,脚本运行? 是一个Apache的这个选项,一个PHP或由客户端定义自己?
另外,如果脚本通过卷曲叫什么?

Say, I have PHP running on an Apache. When someone makes a client request (doesn't matter how), what defines the amount of time that the client will wait for, the script to run? Is this option of an Apache, of a PHP or is defined by the client himself? Also, what if the script is called via curl?

推荐答案

请参阅PHP的 set_time_limit()函数

See PHP set_time_limit()

设置几秒钟的脚本允许运行的次数。如果达到这一点,脚本返回一个致命错误。默认限制为30秒,如果存在的话,在的max_execution_time 在php.ini定义的值。

Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini.

请注意:

该函数时,PHP在安全模式下运行没有影响。没有比在php.ini关闭安全模式或改变的时限其他解决方法。

This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

您可能也有兴趣的 max_input_time设置(通过设置php.ini中)

You might also be interested in max_input_time (set via php.ini)

这在设定秒的脚本允许解析输入数据,如POST和GET的最长时间。它接收来自服务器脚本执行的开始的所有数据的时刻测得的

This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. It is measured from the moment of receiving all data on the server to the start of script execution.

这篇关于什么定义了PHP的超时时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆