If session.cookie_lifetime
is 0, the session cookie lives until the browser is quit.
EDIT: Others have mentioned the session.gc_maxlifetime
setting. When session garbage collection occurs, the garbage collector will delete any session data that has not been accessed in longer than session.gc_maxlifetime
seconds. To set the time-to-live for the session cookie, call session_set_cookie_params()
or define the session.cookie_lifetime
PHP setting. If this setting is greater than session.gc_maxlifetime
, you should increase session.gc_maxlifetime
to a value greater than or equal to the cookie lifetime to ensure that your sessions won't expire.