Re: ignore-user-abort and connection-handling

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

 



Hey Craig,

Thanks for the answer, my test data is 935 records and on initial page load, it only takes 2 seconds to load the entire page.

So I probably won't worry about it for now. Thanks for the answer! :)


On Aug 23, 2007, at 1:30 PM, Craige Leeder wrote:

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 <japruim@xxxxxxxxxx> 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



--

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


[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