Getting New Session Every Page Load |
[eluser]Michael Wales[/eluser]
This issue just cropped up recently - to be honest, I'm not sure what I changed within my code to make it occur. This application is currently being developed used on localhost - I am receiving a new session upon every page load. This error is occurring in both Firefox and IE, so it's not just IE's retarded cookie management. I am currently loading the session class via autoload. I do backup my entire application and the database and transfer it to a USB drive to work on while away from home. The web server is xampp running on the USB drive, but I believe the same was occurring at home on a full xampp installation. config.php Code: $config['sess_cookie_name'] = 'obfuscated'; log-2007-08-03.php (Full log to Level 4 - went to index.php, clicked my home link which links to the same location - notice the session load and not finding the variable) Code: DEBUG - 2007-08-03 06:52:24 --> Config Class Initialized Does anyone have any helpful ideas?
[eluser]Michael Wales[/eluser]
Figured it out, I needed to set the cookie's domain to a blank string... I'm confident I have used localhost in the past when developing on localhost - can anyone explain what is the proper setting (when on localhost) and why it would not work now?
[eluser]Peter Ivanov[/eluser]
i have the same problem too even that i have cookie’s domain as a blank string so i switched to native PHP sessions instead of CI sessions
[eluser]Scott - Beyond Coding[/eluser]
For local development (I use XAMPP too), I've found it's best to set up a full-style domain instead of just using "localhost".. ie. set the cookie domain to something like .local.yoursite.com and chances are all your session problems will magically disappear See this thread: http://ellislab.com/forums/viewthread/45450/
[eluser]Sean Downey[/eluser]
Alas this has still not fixed the problem for me :-(
[eluser]adamp1[/eluser]
Seems strange I had this problem once and by removing the domain and replacing it with a blank it then worked. This seems to be a very common problem which so far has no universal solution. |
Welcome Guest, Not a member yet? Register Sign In |