ensuring that PHP is given unlimited execute
Posted: Tue Oct 17, 2006 5:42 am
Hi people
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:
However, sometimes it doesn't work, and the script stops after a while.
Am I doing something wrong? Can anyone suggest a better approach?
regards
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:
Code: Select all
ini_set('max_execution_time', 36000); // 10 hours
set_time_limit(0);
$original_ignore_user_abort = ignore_user_abort(false);
// a lot of work here....
ignore_user_abort($original_ignore_user_abort);Am I doing something wrong? Can anyone suggest a better approach?
regards