FastCGI servers, for example, impose run-time limits on PHP scripts that cannot be changed using set_time_limit() in PHP. IIS does this too, I believe.
I wrote an import script for a PHP application that works well in mod_php, but does not work in FastCGI (mod_fcgid), because the script is killed after a certain number of seconds. I still do not know how to determine what your time limit is in this case, and have not decided how I am going to get around it. Doing this in small redirected chunks seems like one kludge, but how?
What methods would you use when coding a long-term task, such as an import or export task, where the server through
can be stopped by a separate php script?
Assume that you are creating a portable script, so you donβt have to know if PHP will eventually run in mod_php, FastCGI or IIS or if there will be a maximum execution time at the server level. This probably also excludes shell scripts, etc.
php portability fastcgi execution-time
thomasrutter
source share