Re: [PHP] when does php stop php executing when user clicks stop
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Sun, 30 Dec 2007 19:05:26 -0600 (CST)
On Fri, December 28, 2007 6:33 pm, Eric Wood wrote:
If database operations are underway when a user accesses a web page,
then user clicks stop on the browser, does the php stop immediately
too?
Maybe.
http://php.net/ignore_user_abort
I'd rather the php continue behind the scenes to fullfill all the
actions I need it do to whether the user wants to see if happen or
not.
Overall I wonder how modphp keeps the code executing even if the
browser
drops the connection via stop.
Any insight is greatly appreciated.
If you want to be 100% sure something gets done, then don't do it. :-)
Set up a "task" to be done later, and put that in the DB, and then
have a cron job to run through the "tasks" and do them, and mark them
"done" or not.
The fact you are asking indicates that you've got something that takes
too long for a user to wait around anyway, and that's another reason
to just insert a "task" and act on it later.
Don't make a human wait for a slow computer, ever.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
.
- References:
- when does php stop php executing when user clicks stop
- From: Eric Wood
- when does php stop php executing when user clicks stop
- Prev by Date: Re: [PHP] php.ini in php5.2.1
- Next by Date: Re: [PHP] Unix date (even more bazaar)
- Previous by thread: Re: [PHP] when does php stop php executing when user clicks stop
- Next by thread: php.ini in php5.2.1
- Index(es):
Relevant Pages
|