Ok, so I am using the function session_set_save_handler with a mysql db to store the sessions. That all works. All I did was copy/paste and edit the example in the php manual.
Now, the only thing is I have no idea how to implement the garbage collection. I tried putting just a print statement in my custom garbage collection and I don't get any output from it. I thought that it was supposed to be called up whenever a session is started? atleast as long as session.gc_probability is equal to 1? which it is.
Just to let you know, in the db table I have start_time and a last accessed time columns. The way I wanted to do garbage collection was like this:
if current time - last accessed time is greater than maxlifetime delete the session.
I guess my main problem is just that as far as I can tell the garbage function is never getting called up. So am I supposed to do this manually somewhere? or what would your advice be?
Thanks, Mike.