RE: [PHP] Full-Bore Linear Panic
| From: | Krznaric Michael | Date: | Tue, 08 Aug 2000 20:40:33 +0000 |
| Subject: | RE: [PHP] Full-Bore Linear Panic | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10785@lists.php.net to get a copy of this message | ||
This sounds like a database issue. Are you changes comitted before you
check for the updated value?
-----Original Message-----
From: David VanHorn [mailto:dvanhorn@cedar.net]
Sent: Tuesday, August 08, 2000 4:07 PM
To: php general; mysql@lists.mysql.com
Subject: [PHP] Full-Bore Linear Panic
I just hit a large bug.
As part of my authentication, I pass the browser a random cookie for use on
the next page.
I then get the cookie the browser sent me, and check the DB. If that cookie
exists, then I write the new cookie for next time. If not, I do nothing,
and the cookie I passed is not valid (since it didn't get written).
That works fine..
Later in some scripts, I use the cookie value to pull up the user
information.
Here, it fails, UNLESS: I add in sleep(1) before the cookie check.
In the failed case, when I check the cookie value I was looking for, it IS
present in the databaase, and a manual query through MySQL confirms this.
I can absolutely trigger this problem by removing the sleep statement
before the second cookie check.
It seems that when I stored the cookie, it didn't happen in time for the
next part of the script to check.
--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net