Welcome Guest, Not a member yet? Register   Sign In
Why I can't retrieve data from session in CodeIgniter3?
#1
Photo 

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:
$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 


Code:
$this->data['f'] = $this->session->userdata('email');


Attached Files Thumbnail(s)
       
Reply


Messages In This Thread
Why I can't retrieve data from session in CodeIgniter3? - by hengsopheak - 06-10-2015, 10:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB