CodeIgniter Forums
ci_sessions cookie is secure connections only? - 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: ci_sessions cookie is secure connections only? (/showthread.php?tid=53376)



ci_sessions cookie is secure connections only? - El Forum - 07-21-2012

[eluser]Unknown[/eluser]
Hello,

I an new to CI and I trying to write a simple app that has the usual user registration ritual.

I noticed that when I turn https on, my code works fine (both resistration and login/logout process). But it fails to work with plain http.

After some search I noticed this in ci_session cookie :
Quote:Send for: Secure connections only

I don't recall setting anything explicitly to cause this behavior.

I tried to play with the config variables setting
Code:
$config['sess_encrypt_cookie']
and
Code:
$config['sess_use_database']
to all possible true/false combinations but it was no use.

I also did not find anything in the documentation.

I wonder whether employing sessions in CI has to be always over https.


ci_sessions cookie is secure connections only? - El Forum - 07-21-2012

[eluser]Unknown[/eluser]
Ok, I figured this out: it is another config variable that is causing this behavior:
Code:
$config['cookie_secure'] = TRUE;
It should be set to false.