Possible Duplicate:
Cross domain PHP Sessions
I have an IIS6 / WIMP system.
When a user visits a page on:
then a page on:
I need the session id to stay the same. I do not need to retain the session variables, just the session id. Each sub domain is setup as a separate site in IIS.
I would like to configure this through IIS, but if I have to do it through php that would work as well.
You should change
session.cookie_domaindirective in your php.ini file, or you can use PHP ini_set function.You change it using ini_set function like this:
You should do this somewhere at bootstrap level.
This should work. I had similar situation where I had to create session at http://www.domain.com, and then use that session on http://www.subdomain.domain.com. And it works great.
Hope this helps!