Welcome Guest, Not a member yet? Register   Sign In
Code Igniter Sessions and Internet Explorer ( Session clears on refresh )
#1

[eluser]Unknown[/eluser]
Hi,

I'm having following problem with using CI Session while in Internet Explorer 9 (didn't test it with another versions

For some reason CI Session->set_userdata () behaves like a flashdata in IE - data clears after each refresh, new page etc. Everything works just fine in all other browsers!

My Session and Cookie related config:
Code:
$config['sess_cookie_name']  = 'cisession';

$config['sess_expiration']  = 7200;

$config['sess_expire_on_close'] = FALSE;

$config['sess_encrypt_cookie'] = FALSE;

$config['sess_use_database'] = FALSE;

$config['sess_table_name']  = 'sessions';

$config['sess_match_ip']  = FALSE;

$config['sess_match_useragent'] = TRUE;

$config['sess_time_to_update'] = 300;

Code:
$config['cookie_prefix'] = "";

$config['cookie_domain'] = "10.234.13.120"; // my local test domain

$config['cookie_path']  = "/";

$config['cookie_secure'] = FALSE;

Any suggestion , tip will be ver appreciated. I've looked through several CI Forum topics but nothing helped so far.
#2

[eluser]Chathuranga Tennakoon[/eluser]
i have also faced to this bug with the Codeigniter older release. as far as i remember, i changed session_expiration time as follows.

Code:
$config['sess_expiration']  = 0;

then it will not expire the session. even if this work, it is not a good solution, Wink anyway this might helpful for you!
#3

[eluser]InsiteFX[/eluser]
IE has lot's of user_agents that are over 255 characters long!
Code:
$config['sess_match_useragent'] = FALSE;

Also make sure you are using the correct ci_session table in the database!
#4

[eluser]Unknown[/eluser]
[quote author="InsiteFX" date="1330349680"]
Code:
$config['sess_match_useragent'] = FALSE;
[/quote]

Thank you ! That helped Smile

I am not using db to store sessions, still I'll keep that in mind

Actually I was thinking about sdetting that param to false - just for a test - but than I said to myself - "Useragent?, nah, can't be the case" ... Hate when it happens Smile Turns out that I'm just lazy :/ Thanks again!





Theme © iAndrew 2016 - Forum software by © MyBB