http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime
says that a session.cookie_lifetime of 0 \"goes until the browser is closed\". Is
Set session.gc_maxlifetime to 172800
and session.cookie_lifetime to 0
.
In general, session.gc_maxlifetime is the configuration to control the session’s life time. So setting that directive to 172800
will make the session to expire after 172800 seconds (theoretically). But as the calculation of the age of a session is slightly odd, you might want to implement a more accurate expiration scheme. See my answer to How do I expire a PHP session after 30 minutes? for more information.
And setting the session ID’s cookie lifetime to 0
, the cookie will be valid until the browser is closed.