Max_input_time = -1 What is the exact value of -1?

I could not find this in the docs, but:

max_input_time = -1

mean there is no limit?

It seems strange to me that max_execution_time = 0forever.

But what does it mean -1for max_input_time?

+4
source share
5 answers

A quick look at the file php.iniwill show you:

; Maximum amount of time each script may spend parsing request data. It 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 may have guessed correctly:

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

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

+7
source

In php.iniyou will find the answer to your question:

; Maximum amount of time each script may spend parsing request data. It 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 means -1 unlimited , because no script can be executed with negative time.

0 , script .

+1

, :

max_input_time

, script , POST GET. , PHP , . - -1, , max_execution_time. 0, .

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

, , , php.ini, .

+1

max_input_time = -1 , , .

0

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

-2
source

Source: https://habr.com/ru/post/1589064/


All Articles