note 45779 added to features.connection-handling
| From: | Lee at osu1 dot php dot net | Date: | Sat, 18 Sep 2004 10:16:57 +0000 |
| Subject: | note 45779 added to features.connection-handling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76934@lists.php.net to get a copy of this message | ||
The point mentioned in the last comment isn't always the case.
If a user's connection is lost half way through an order processing script is confirming a
user's credit card/adding them to a DB, etc (due to their ISP going down, network trouble...
whatever) and your script tries to send back output (such as, "pre-processing order" or
any other type of confirmation), then your script will abort -- and this could cause problems for
your process.
I have an order script that adds data to a InnoDB database (through MySQL) and only commits the
transactions upon successful completion. Without ignore_user_abort(), I have had times when a
user's connection dropped during the processing phase... and their card was charged, but they
weren't added to my local DB.
So, it's always safe to ignore any aborts if you are processing sensitive transactions that
should go ahead, whether your user is "watching" on the other end or not.
----
Manual Page -- http://www.php.net/manual/en/features.connection-handling.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45779
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45779&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45779&report=yes
Search -- http://master.php.net/manage/user-notes.php