risking annoying you;
You are asking the wrong question. You do not need a reason not to deviate from the default values, but vice versa. You need a reason for this. Timeouts are absolutely necessary when starting a web server and disabling this parameter for no reason, in fact, contrary to good practice, even if it runs on a web server that has its own timeout directive.
Now for the real answer; it probably doesn't matter at all in this particular case, but itβs bad practice to set up a separate system. What if the script is run on another server with a different timeout? If you can say with confidence that this will never happen, itβs good, but good practice is largely related to the seemingly unlikely events and not unnecessarily link the settings and functionality of completely different systems. Dismissal of such principles is responsible for many meaningless incompatibilities in the software world. Almost every time they are unforeseen.
What if the web server is later configured to run another runtime that only inherits the timeout parameter from the web server? Say, for example, that you need a 15-year-old CGI program written in C ++ by someone who has moved to another continent that does not know a single timeout other than a web server. This can lead to a change in the timeout because PHP relies aimlessly on the timeout of the web server and not on its own, which can cause problems for the PHP script. Or vice versa, you need less web server timeout for some reason, but PHP should still have it higher.
Itβs just not worth connecting PHP functions with a web server, because the web server and PHP are responsible for different roles and should be as functional as possible. When the PHP side needs more processing time, it should be set up in PHP simply because it is related to PHP and not necessarily everything else on the web server.
In short, it simply unnecessarily unites the question when there is no need.
And last but not least, "still" is true; you should at least use set_time_limit() than ini_set() .
Hope this is not too patronizing and annoying. As I said, this may be good in accordance with your specific circumstances, but it is good practice that your assumptions are not considered the One true Circumstances. All this.:)
Teekin Nov 29 '10 at 19:02 2010-11-29 19:02
source share