I am using sess_driver like this in config:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'CISESSION';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 0;
$config['sess_regenerate_destroy'] = TRUE;
It is working after browser close means when i close the browser and again when i login it is inserting a new row to ci_sessions table but its not happening after logout means if i logout and again do the login then it is not inserting a new row in ci_sessions table.
Kindly help .
I'm pretty sure what you are describing is the default behavior. Nevertheless, you could try:
$this->session->sess_destroy();
if (substr(CI_VERSION, 0, 1) == '2') {
$this->session->sess_create();
} else {
if (version_compare(PHP_VERSION, '7.0.0') >= 0) {
session_start();
}
$this->session->sess_regenerate(TRUE);
}
for logging out (taken from Ion_Auth
)