[thelist] in-principle, PHP/mySQL shopping basket question

Marek Kilimajer kilimajer at webglobe.sk
Wed Jul 23 10:37:35 CDT 2003

Garbage collector is designed for this. Everytime you call 
session_start(), there is session.gc_probability % probability that 
garbage collector starts up and removes all session files that have not 
been accessed for session.gc_maxlifetime seconds.

john at johnallsopp.co.uk wrote:

> Hiya
> In principle, how does this work? I'm developing a shopping basket for one
> of my sites in PHP/mySQL. So the client arrives, gets a session id, adds
> things to their basket and then leaves without buying anything.
> What rule do I implement to discard the basket. I can't tell that they've
> left the site barring timeout, and what if someone wants to keep their
> basket open overnight or similar?
> What have I missed?
> Cheers
> J

More information about the thelist mailing list