0

I have edited session.cookie_domain = ".mysite.in" in php.ini to share one single session for same user across all the sub domains of my site.

But it is not working weird. Now if I open a session at "www.mysite.in", it gets shared with "mysite.in"(no www), but not with "oth.mysite.in".

PS : The session did not get shared to "mysite.in" before. So edit definitely has some effect.

rnbguy
  • 1,369
  • 1
  • 10
  • 28
  • Discussion here might help: http://stackoverflow.com/questions/348282/php-cookie-domain-subdomain-control including use of [session_set_cookie_params()](http://us1.php.net/session_set_cookie_params) – Digital Chris Mar 13 '14 at 12:55
  • neither ini_set nor session_set_cookie_params work for me. so I used php.ini. But it is half working. – rnbguy Mar 13 '14 at 13:00
  • Go check the `Set-Cookie` that your browser receives, and check whether or not it shows that same cookie value for `oth.mysite.in` domain. – CBroe Mar 13 '14 at 13:20

0 Answers0