CodeIgniter Forums
Bad cookies! "autologin" cookie created on localhost, but not on www server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Bad cookies! "autologin" cookie created on localhost, but not on www server (/thread-24008.html)



Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 10-28-2009

[eluser]dallen33[/eluser]
What could be the reason for an autologin cookie not being created on my web server? When I use MAMP on my Mac, everything works fine. I'm using dx_auth and when I click "remember me", an autologin cookie is created. Works great!

But when I put the files up on my server, no autologin cookie is created. ci_session is, but not autologin. Any ideas why?


Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 10-28-2009

[eluser]Phil Sturgeon[/eluser]
Do you have the cookie domain configured properly in config.php?


Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 10-28-2009

[eluser]dallen33[/eluser]
Alright, so I added ".mydomain.com" to the config.php. I cleared out the ci_sessions table and tried to login. Can't login at all. Just refreshes the login page with no errors. So I removed the domain from config.php, deleted my cookies and emptied the ci_sessions table, so now I'm back to square-one.

Still no autologin being created.


Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 10-28-2009

[eluser]dallen33[/eluser]
I'm not sure what I did wrong before, but now I can at least login with my ".domain.com" in config.php.

Still no autologin cookie created. I don't understand why only one cookie gets created. Could this be a PHP setting?


Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 10-28-2009

[eluser]dallen33[/eluser]
I'm wondering if it's a probably with dx_auth. I built a test page where I create multiple cookies and they work just fine. I can delete them as well. So now I have to figure out why dx_auth doesn't want to create the autologin cookie...


Bad cookies! "autologin" cookie created on localhost, but not on www server - El Forum - 11-03-2009

[eluser]dallen33[/eluser]
Anyone else have any ideas? This is getting painful!