Forum Moderators: coopster
session.use_cookies = 1
session.cookie_lifetime = 999999999
session.gc_maxlifetime = 999999999;
But when I have done this, all the cookied send to lient will never be expired. If some body only want to logon once, this will not work properly. Another question is, when someone logon and closed his browser without click to logout, the session file on the server will never be removed by gc. If the cookie on client was deleted by himself, then the session file is useless, how can I
remove this session file?
Thanks for your help!
Have a great day!
This is one of those cases where you may want to control session management yourself [php.net] and define your own garbage collection routines based on a partiular date or timestamp or something as well as checking an entry for that particular session name/user.
It's either that or write a different script or cron job to walk through your *session directory* every so often and pick and choose which files to remove. That would require parsing the serialized data though. I tend to think that managing them via a database and SQL statements would be a bit easier.
Nonetheless, it will be a nice project and a bit of work to get refined the way you would like.