CodeIgniter Forums

Full Version: How to set session expire on close
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello eveybody,

do you know how to set:

$config['sess_expire_on_close'] = TRUE;

in version 4? My app\Config\App.php is:

public $sessionDriver            = 'CodeIgniter\Session\Handlers\FileHandler';
public $sessionCookieName        = 'ci_session';
public $sessionExpiration        = 7200;
public $sessionSavePath          = WRITEPATH . 'session';
public $sessionMatchIP           = false;
public $sessionTimeToUpdate      = 300;
public $sessionRegenerateDestroy = false;

and if I close the browser (not a single Tab, the browser) and then reopen it my old sessions are still there.

Thank you!
PHP Code:
$sessionExpiration 0
(04-08-2019, 03:13 AM)InsiteFX Wrote: [ -> ]
PHP Code:
$sessionExpiration 0

it's also written in the comment above, I've to pay more attention next time...

Thank you!