CodeIgniter Forums
CodeIgniter session's problem with browsers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CodeIgniter session's problem with browsers (/showthread.php?tid=8828)



CodeIgniter session's problem with browsers - El Forum - 06-02-2008

[eluser]RaiNnTeaRs[/eluser]
I have difficulties in getting session data in some internet explorer. What is the setting for Internet Option in Internet Explorer to enable the CodeIgniters session. Thanks.


CodeIgniter session's problem with browsers - El Forum - 06-02-2008

[eluser]RaiNnTeaRs[/eluser]
HEEELPPP


CodeIgniter session's problem with browsers - El Forum - 06-02-2008

[eluser]Lukifer[/eluser]
1. Make sure cookies are turned on. The server can't find your session unless it has the cookie containing your session id.

2. Make sure that your cookies are on the same domain. (If you have a cookie for "domain.com" set, and the session id is stored under "www.domain.com", it won't pass the correct cookie, and won't find your session). Check your config.php.

If CI's cookie/session aren't working for you, vanilla PHP sessions ($_SESSION, session_start(), etc.) work just fine, and the wiki has several other session implmentations you can try.


CodeIgniter session's problem with browsers - El Forum - 06-02-2008

[eluser]RaiNnTeaRs[/eluser]
but the problem is... my session wont work ONLY on some internet explorer on SOME PC's.


CodeIgniter session's problem with browsers - El Forum - 06-02-2008

[eluser]Lukifer[/eluser]
Try clearing cookies/cache, turn down browser security settings, check list of cookies in browser (don't remember how to do this on IE...)

On the server side, check that the session cookie is getting passed using:
Code:
var_dump($_COOKIE['PHPSESSID']); // Native PHP sessions
or
Code:
var_dump($_COOKIE['ci_session']); // CodeIgniter sessions (see config.php)

If you get "false", the browser is not storing or not passing the cookie, in which case you need to troubleshoot the browser further.