CodeIgniter Forums
CI fails to create session - 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 fails to create session (/showthread.php?tid=49146)

Pages: 1 2 3


CI fails to create session - El Forum - 03-13-2012

[eluser]zsela[/eluser]
This is pretty weird. I downloaded and installed an unspoilt package of CodeIgniter (version 2.1) and made the minimal settings to run the system, and the problem is still reproducible: every time I load the welcome page in Chrome a new record is created in the session table, but not when loaded with Firefox.

The changes I made:
- set the base_url and encryption key and modified the session table name and enabled database storage for sessions in the config.php
- in autoload.php added session library to the list of automatically loaded libraries
- filled in the database info in database.php

I am out of ideas now...




CI fails to create session - El Forum - 03-13-2012

[eluser]CroNiX[/eluser]
It's more likely a problem with cookies than actual sessions, since the sessions rely on the cookies. There are a lot of people who have problems with Chrome and IE due to cookies. Lots of threads on this forum dealing with that.


CI fails to create session - El Forum - 03-13-2012

[eluser]zsela[/eluser]
You were right, this was a cookie problem.
I found this thread about the same issue with the solution:

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

I don't know why this works, but i am glad it does.

Thank you all for your help!