Click to See Complete Forum and Search --> : async in php


Xin
09-03-2003, 02:27 PM
I have such a case that, in a PHP/MySQL/Apache setup, the users will submit requests for some time-taking database processing but they don't want to wait for the result (they can check back later).

How can I return to the users with some message and release their http connection so that they don't need to wait, but at the same time, proceed to the database processing asynchronously?

I was thinking of using register_shutdown_function for the database part, but later I found someone comments that (last comment on http://www.php.net/manual/en/function.register-shutdown-function.php), if running Apache/Win, the http connection will stay until the register_shutdown_function completes all the task.

Any solution or advice?

Thanks,
Xin