0

I have a website here at http://harrisonprograms.com. You can register, login, logout all that good stuff but when you go to a subdomain such as blogs.harrisonprograms.com the login session doesn't take place on the subdomain.

It uses PHP sessions. So what I'm saying is all domains and subdomains can sign in but don't carry the session to a different domain. For example harrisonprograms.com won't carry the session over to blogs.harrisonprograms.com.

  • 1
    Do they run on the same server? If yes, read this - http://stackoverflow.com/questions/644920/allow-php-sessions-to-carry-over-to-subdomains – Cheery Oct 07 '14 at 18:08
  • You must not have '/' as the domain for your session cookie – ArtisticPhoenix Oct 07 '14 at 18:08
  • 1
    `/` would be the path. The domain needs to be set to `.harrisonprograms.com` with the leading `.` to specify all subdomains. php.ini or [session_set_cookie_params](http://php.net/manual/en/function.session-set-cookie-params.php) – Jonathan Kuhn Oct 07 '14 at 18:09
  • @JonathanKuhn your right sorry about that. I almost never have session issues myself. I was thinking of a sub-folder for the path, as I have had that happen before, but I don't think it was with session cookies. – ArtisticPhoenix Oct 07 '14 at 18:11
  • Try to avoid the use of sub-domains – Jelle Keizer Oct 07 '14 at 18:25

0 Answers0