RE: ignore-user-abort and connection-handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




if aborted actions are a worry, then consider using transactions in the database, if the process is interupted at any time, the changes made will all role back to a pre transaction start state.

bastien




----------------------------------------
> Date: Thu, 23 Aug 2007 13:30:00 -0400
> From: cleeder@xxxxxxxxx
> To: php-general@xxxxxxxxxxxxx
> Subject: Re:  ignore-user-abort and connection-handling
> 
> Hi Jason,
> 
> If you have a lengthy script with several queries throughout it, it is
> possible you could end up with a scrambled database. However, with
> short scripts, there is not much of a threat of this. Generally, your
> scripts will probable execute in < 2 seconds (and 2 seconds is
> lengthy), with an average of 1 second or less. In these cases, by the
> time the user makes the request to the server, it will take longer
> than the length of your script execution for the termination request
> to be sent from the browser to the web server, and then to php.
> Therefor, php will simply halt returning output(assuming output
> buffering), but all script execution will be complete.
> 
> That being said, if you wanted extra peace of mind, you could enable
> ignore-user-abort. Odds are though, that you will never really need it
> unless you are writing lengthy scripts that take several seconds to
> execute.
> 
> Hope this helps,
> - Craige
> 
> On 8/23/07, Jason Pruim  wrote:
> > Hi Everyone :)
> >
> > One of these days someone is going to get sick of hearing from me,
> > but until that day comes I have another question :)
> >
> > I asked on a MySQL list about wether it's better to have 1 database
> > with many tables, or many databases with 1 table for my address list
> > application I'm writing.
> >
> > One of the people there asked me about "terminating the TCP
> > connections and ensuring that each PHP script runs to completion" to
> > keep the database in good condition.
> >
> > He recommened looking at the ignore-user-abort and connection-
> > handling functions in php...
> >
> > So now the question, Do I have to worry if a user hits the stop
> > button in their browser before the script finishes? Will It corrupt
> > the database or causing undo havoc to my system?
> >
> > This is far past my knowledge, so references to how I would use
> > something like that properly would be greatly appreciated! :)
> >
> >
> > --
> >
> > Jason Pruim
> > Raoset Inc.
> > Technology Manager
> > MQC Specialist
> > 3251 132nd ave
> > Holland, MI, 49424
> > www.raoset.com
> > japruim@xxxxxxxxxx
> >
> >
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux