Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max_input_time= -1 What is the exact meaning of -1?

Tags:

php

php-ini

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 ?

like image 870
Chris Muench Avatar asked May 20 '15 18:05

Chris Muench


2 Answers

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:

  • php.ini file for production
  • php.ini file for development
like image 141
Rizier123 Avatar answered Nov 11 '22 07:11

Rizier123


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.

like image 34
Timido Avatar answered Nov 11 '22 07:11

Timido