CodeIgniter Forums

Full Version: Why I can't retrieve data from session in CodeIgniter3?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear Codeigniter.

I've create new web app using Codeigniter3 and I have a problem on session data.

Issue 1: I can't retrieve any data from my session data although it existing in database.

Issue 2  Rows of session table automatically increase and never deleted although I enable sess_expire_on_close to True. And When I refresh pages in Firefox 4 rows of table session will increase the same time. so it will increase to more and more rows if my web pages refresh more and it will increase one by one if I refresh in Chrome browser.

Please check on my configure.

Code:
Code:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'tb_session';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;

Please check on my attachment to see the increasing of rows when chrome and firefox refresh pages.

And I've also can retrieve any data from table session when I used this method
If you want help with a problem like this you need to show some code so that we may be able to help you.
... or actually use a CodeIgniter 3 configuration. The one shown is for CI2.