Using login Session credentials across main domain & subdomain (mobile) - 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: Using login Session credentials across main domain & subdomain (mobile) (/showthread.php?tid=50561) |
Using login Session credentials across main domain & subdomain (mobile) - El Forum - 03-30-2012 [eluser]russ_kern[/eluser] Hey all, Is it possible to access session data generated via login from codeigniter between a primary domain and a subdomain? I.E. I have http://somedomain.com as my primary but I want the user to be able to freely jump back and forth between that one and http://m.somedomain.com. I have set all the session information in the config file the same between the 2, but I still get a login screen when I jump to the mobile subdomain. Any help would be greatly appreciated. even if the answer is that it isn't possible or is very difficult, I can start working on an alternate solution and quit messing with it. Thanks in advance. R Using login Session credentials across main domain & subdomain (mobile) - El Forum - 03-30-2012 [eluser]oliur[/eluser] Just set the cookie_domain in the config.php file to your site domain. $config['cookie_domain'] = "yourdomain.com"; Using login Session credentials across main domain & subdomain (mobile) - El Forum - 03-30-2012 [eluser]russ_kern[/eluser] I've already set that .... (I have it as ".yourdomain.com" per the config file instruction ) and expected it to work at that point. But no dice. Thanks. (PS .. I also tried it without the dot in front) R |