This is a good class, but isnt it still dependent to gc_maxlifetime for the session lifetime? Because when you get the id with session_id() function it returns it from the php default sessions, and if the session is deleted by the gc you can't get the right session id. So you lose your session data. You have to change your php.ini settings to correct the situation.
I havent tested it yet but this is what i think will happen... Maybe i missed something and im wrong...
Julien PACHET - 2006-09-10 18:59:34 - In reply to message 1 from gurel kaynak
Yes, because my class is a layer beyond the PHP session system, when PHP garbage the session id, my session lost the connection. But you could make a system recover like this:
* The user lost the connection between his session and his id
* So, the user reconnect
* Then, when the user get his user id, you could parse the session data to recover his data and put them into his new session.
My class have a lifetime that can be longer than PHP lifetime session.
Before the lifetime end, all the data are in the table in serialize format.
Therefore, your remark is good, and maybe I will improve my class with your reflection...