Results 1 to 5 of 5
Oct 17, 2006, 03:44 #1
ensuring that PHP is given unlimited execution time
I have a PHP scripts that needs to perform a lot of work.
I need to make sure that the script will never timeout and will never stop its execution in the middle.
I tried something like:
ini_set('max_execution_time', 36000); // 10 hours
$original_ignore_user_abort = ignore_user_abort(false);
// a lot of work here....
Am I doing something wrong? Can anyone suggest a better approach?
Oct 17, 2006, 03:56 #2
Do the work in parts, ie. do a chunk then rest for a bit then do another chunk etc.
Oct 17, 2006, 03:59 #3
no, I need to do all the work in a single request
Oct 17, 2006, 04:06 #4
Ok...clearly you can't, you can set whatever "max_execution_time" you want but the OS cuts your process off when it excceds its time share and it has to wait for all the other processes to finish before it gets to go again. So find a way to break the work down.
Oct 17, 2006, 06:25 #5
- Join Date
- Sep 2005
- 0 Post(s)
- 0 Thread(s)
are you on a shared host? if you are you may have to use a .htaccess file to manipulate php ini values.