PHP Background Processes

Well, you can use “ignore_user_abort(true)”

So the script will continue to work (keep an eye on script duration, perhaps add “set_time_limit(0)”)

But a warning here: You will not be able to stop a script with these two lines:

ignore_user_abort(true); 
set_time_limit(0);

Except you can directly access the server and kill the process there! (Been there, done an endless loop, calling itself over and over again, made the server come to a screeching stop, got shouted at…)

Leave a Comment