Skip navigation
Currently Being Moderated

same session across different subdomains

Apr 11, 2012 6:37 PM

How do I create a session so that it will work across different subdomains on my website?

 
Replies
  • Currently Being Moderated
    Apr 12, 2012 5:53 AM   in reply to future-architect

    I think you are going to have to store that information as a cookie if it will be used in sessions across mulitple domains.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2012 5:31 PM   in reply to future-architect

    Add this before you start your session:

    ini_set("session.cookie_domain", ".your_domain.com");

     

    This will allow session variables travel trough your subdomains.

     

    You can also change your php.ini file but it will affect the whole server permanently.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points