What's the max value of max_input_time?

爷,独闯天下 提交于 2020-01-02 03:19:08

问题


Seems that max_execution_time is 0 but memory_limit is -1.

For max_input_time is it 0 or -1 or both?


回答1:


The absolute maximum value is the limit of the long type in C:

long max_input_time; member in struct:_php_core_globals 

See: http://lxr.php.net/search?q=max_input_time&defs=&refs=&path=&hist=&project=PHP_5_4

The effective maximum value is 2147483647, to maintain interoperability. It may be more on a specific platform or implementaion, but this is the most common, 32bit max.

As you can also see at a few spots in the source (ie if (PG(max_input_time) != -1)), the value -1 is treated as equivalent to maximum. 0 would be treated as zero.

Documentation

  • Runtime configuration - http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
  • PHP source code browser search for "max_execution_time" - http://lxr.php.net/search?q=max_input_time&defs=&refs=&path=&hist=&project=PHP_5_4



回答2:


The max_input_time determines how much time should be allowed to retrieve data from POST, GET. You need to set logical value, the default setting of 60 seconds works fine in most cases.

Note that default setting is 60 seconds so if you get max_execution_time set to 300, the script would fail after 60 seconds but report that it had exceeded the max execution time of 300.



来源:https://stackoverflow.com/questions/4103952/whats-the-max-value-of-max-input-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!