Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass session between subdomains

Status
Not open for further replies.

richardko

Programmer
Jun 20, 2006
127
US
is it possible to pass session between subdomains? if so how?

The first few results in google search were not helpful.
 
i may be a bit slow this morning but would this not work:

domain1 = domain2 = customers.myserver.com

normal behaviour would be that the cookies would not transfer

but ...

if you set the following directive at the top of script before you start the session or in php.ini

Code:
ini_set ('session.cookie_domain', '.myserver.com'); //note the prepended period
I *think* that would work.

if not, then you can always store your session data in a database and pass a uniqueID around in rewritten links and/or hidden form fields. sleipnir214 has posted an FAQ on the subject.
 
thank you, that was one of the documentation i found in google search. it was the single quote/double quote confusion that had the script not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top