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? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] when does php stop php executing when user clicks stop
On Dec 28, 2007 8:43 PM, Eric Wood <[EMAIL PROTECTED]> wrote: > 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? > > > > 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. > > > > thanks, > > -eric wood > > > > > I pretty much found my answers over at: > http://us2.php.net/manual/en/features.connection-handling.php > > thanks anyway, You may also want to look into ignore_user_abort(), Eric. -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] when does php stop php executing when user clicks stop
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? > > 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. > > thanks, > -eric wood > > I pretty much found my answers over at: http://us2.php.net/manual/en/features.connection-handling.php thanks anyway, -eric wood -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php