What's the max value of max_input_time?

19,812

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

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.

Share:
19,812
Anish
Author by

Anish

Coder. Entrepreneur.

Updated on August 25, 2022

Comments

  • Anish
    Anish over 1 year

    Seems that max_execution_time is 0 but memory_limit is -1.

    For max_input_time is it 0 or -1 or both?

    • Anish
      Anish over 13 years
      in 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
    Anish over 13 years
    dude, 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
    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
    Chris Baker over 11 years
    @Sarfraz I don't see how this answer or the bug pertains the question as asked.
  • Leigh
    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
    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
    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.