Re: [PHP] when does php stop php executing when user clicks stop



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?
.



Relevant Pages

  • Re: how to run scripts after a page has already loaded and been sent to a users browser?
    ... > It's because PHP is a server side scripting language, ... > do stuff before you send stuff to user's web browser. ... As we've discussed on this newsgroup before, if a script starts ... that is after the last HTML is sent to a web browser. ...
    (alt.php)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have access ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have access ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the default ... so if you want to use one of the html builders or one of the more elaberate ...
    (alt.os.linux.suse)