What's the max value of max_input_time?
Solution 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
Solution 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.
Comments
-
Anish over 1 year
Seems that
max_execution_time
is0
butmemory_limit
is-1
.For
max_input_time
is it0
or-1
or both?-
Anish over 13 yearsin some websites it's mentioned that the max(unlimited value) for max_input_time is -1, in some others it's mentioned that it's 0. i searched in php website, but couldn't find this. does anyone know about this?
-
-
Anish over 13 yearsdude, are you sure that the max value of max_input_time is 0? while i was searching for this in some places i found the max value as -1. eg: bytes.com/topic/php/answers/…
-
Sarfraz over 13 years@Anish: It seems to be a bug, creating confusion there for you, check out: bugs.php.net/bug.php?id=37306
-
Chris Baker over 11 years@Sarfraz I don't see how this answer or the bug pertains the question as asked.
-
Leigh over 11 years"Specific value" depends on the compiler / target platform. The
long
type is only guaranteed to be "at least 32 bits" -
Pacerier about 9 years@ChrisBaker, Why do we have to grep the source to know that
-1
represents unlimited? What's the PHP manual doing? -
Mukesh over 5 years@Sarfraz Your answer helped me to post a large amount of data. Even though I had increased max_input_vars value I was not able to post the the data but after increasing the max_input_time to higher value, I got success.