Welcome Guest, Not a member yet? Register   Sign In
Share PHP Sessions across sub domains
#1

I am trying to set up the following:

Code:
auth.domain.com
sub1.domain.com
sub2.domain.com

where if the user visits sub1.domain.com or sub2.domain.com and they are not logged in, they get pushed over to auth.domain.com and can log in. sub1.domain.com and sub2.domain.com are two separate applications but use the same credentials.

I tried setting the following in my php.ini:

Code:
session.cookie_domain = ".domain.com"

but it doesn't seem to be passing the information from one domain to the other.
Reply
#2

You would need to pass that information encoded to the other app.

If both domains use the same database that would be the way to go.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(04-22-2018, 04:29 AM)InsiteFX Wrote: You would need to pass that information encoded to the other app.

If both domains use the same database that would be the way to go.

I was trying to avoid doing something like a query string, but it may be the best way to go after all.

Thank you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB