PHP max exec time ,max upload limit, memory limit etc to unlimited with 0 or -1

StackOverflow https://stackoverflow.com/questions/16834619

  •  30-05-2022
  •  | 
  •  

Question

Sorry if this type of ques already exists.

To set php ini values in script what is the better way for infinity purpose? some people preferred -1 or some 0.

What's the best solution? And why?

Thanks

Était-ce utile?

La solution

Actually that's a bad idea, especially max_exec_time and max_upload_limit - an open invitation to DOS ! And also memory_limit may help you protect your server against scripts running mad.

I wouldn't recommend to set those values to unlimited on a production server, and on stage and test it doesn't even make sense at all, unless you want to restart your server all the time after a programming error.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top