At 07:39 14.11.2002, Josh Bauguss said:
>I've got a fairly high traffic server.  (30-50K uniques per day)
>For the most part, everything works ok.  We get plenty of orders (between
>70-90 a day).   However, I also get complaints from people who say they keep
>losing their cart.
>To try and track down what was going on.  I started storing some fairly
>simple stats from the site.  Here is an example of one sent to me via e-mail
>from my order.html page.
> [...]


maybe this could be because users are submitting carts twice,
doubleclicking the submit button?

What happens in this case would be something like this:

User hits submit button             (Inst.1) PHP reads session data from file
User hits button again              (Inst.2) PHP reads session data from file

I didn't find any hint in the docs that PHP would _not_ flush the session
upon an aborted connection. Having both instances using the same session
data it would be possible for instance 2 to complete before instance 1 gets
to flush its session data, effectively overwriting what instance 2 had saved.

In a closed environment this might be quite unlikely, but with a fairly
high load server it might very well be that the aborted apache fork sleeps
longer than the second instance needs to complete.

If this could be the cause of those intermittent problems there are a
number of solutions you could apply, from simple to complicated. I'll be
happy to submit some ideas here; don't have the time right now, but I'll be
back soon ;-)

   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to