Ticket Details

Incorrect PHP session length

RFC Ticket (closed)

###What happened:
- The session remained active after I closed the browser, using only the PHP Session adapter.


###What was expected:
- The session would reset when the browser was closed.


###Proposed solution:
In the PHP Session adapter,

Replace:
{{{
    protected $_defaults = array(
        'session.cookie_lifetime' => '86400',
    );
}}}
With:
{{{
    protected $_defaults = array(
        'session.cookie_lifetime' => '0',
    );
}}}
so that the session automatically expires when the browser is closed.
on 05.09.10 reported by: xero owned by: jperras

Updates

(works-for-me) on 05.09.10 by gwoo
  • owner was changed to gwoo
  • status was changed to closed
  • resolution was changed to works-for-me
This is the default configuration. You can override the setting in your session config. 
{{{
Session::config(array('adapter' => 'Php', 'session.cookie_lifetime' => 0));
}}}
on 05.09.10 by nate
Since the behavior mentioned in the ticket is by far the most common use case, the default value should probably be changed.
(reopened) on 05.09.10 by jperras
  • status was changed to pending
  • resolution was removed
on 05.09.10 by jperras
  • owner was changed to jperras
  • status was changed to in progress
(fixed) on 06.02.10 by jperras
  • status was changed to closed
  • resolution was changed to fixed
Fixed in [8d00fcdc3a478efff555e18d851588cba0739928]. Default value for `session.cookie_lifetime` has been set to `0` seconds.