php - Session Lifetime Not Working as Expected -
i set gc_max_lifetime setting in php.ini 7 days in seconds yet reason doesn't work, logged in yesterday after setting php.ini came on today , logged out.
i see option:
lifetime in seconds of cookie or, if 0, until browser restarted. session.cookie_lifetime = 0; should mess , mean exactly?
any appreciated.
gc_max_lifetime has nothing session cookies. gc - garbage collector. tells php how long dormant session files should allowed hang around before getting deleted. it's purely server-side setting.
you want session.cookie_lifetime instead.
and per edit, yes, you've set session cookies session cookies - delete on browser close. set value non-zero. e.g. 86400 = 1 day.
Comments
Post a Comment