Codeigniter session data lost after redirect

if you are working in CI 3.x and just upgraded your server php version to php 7.x

Go to system/libraries/Session/session.php at Line no 281 and replace ini_set('session.name', $params['cookie_name']); by ini_set('session.id', $params['cookie_name']);

Leave a Comment