13

I couldn't find this in the docs, but does:

max_input_time = -1

means there is no limit?

I find it odd that max_execution_time = 0 is forever.

But what does -1 mean for max_input_time ?

Rizier123
  • 58,877
  • 16
  • 101
  • 156
Chris Muench
  • 17,444
  • 70
  • 209
  • 362

5 Answers5

17

A quick look into the php.ini file will show you:

; 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=60

So as you already guessed correct:

; Default Value: -1 (Unlimited)
               //^^^^^^^^^^^^^^

You can see the php.ini files for production and development on github:

Rizier123
  • 58,877
  • 16
  • 101
  • 156
10

Actually the documentation says it different:

max_input_time integer

This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time.

The doc is here: http://php.net/manual/en/info.configuration.php#ini.max-input-time

So, to my understanding the comment provided in php.ini is wrong.

Timido
  • 1,646
  • 2
  • 13
  • 16
1

In php.ini you will find the answer to your question:

; 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=60

this specified that -1 is unlimited because no script can be executed with a negative time.

the value 0 means you don't allow your script to parse data or to download files.

william.eyidi
  • 2,315
  • 4
  • 27
  • 39
0

Basically max_input_time = -1 means what you've said, there is no time limit for that directive.

taxicala
  • 21,408
  • 7
  • 37
  • 66
-2

max_input_time = -1 as maximum value. It is 2147483647 in PHP 5.4

PhuLuong
  • 527
  • 4
  • 11