Welcome Guest, Not a member yet? Register   Sign In
Using login Session credentials across main domain & subdomain (mobile)
#1

[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
#2

[eluser]oliur[/eluser]
Just set the cookie_domain in the config.php file to your site domain.

$config['cookie_domain'] = "yourdomain.com";
#3

[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




Theme © iAndrew 2016 - Forum software by © MyBB