Share PHP sessions among multiple domains

vibol

Active Member
Jan 21, 2014
27
0
1
cPanel Access Level
Root Administrator
Hello i have have domain.com and sub.doamin.com but how to make both domain have the same session when i start session or cookie ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Re: About php session

Thz... so we can't use session on the different domain. Just share it by Get or Post the id instead.
Hmmm.. ok Let me try!
I just wanted to point out that it's likely not a good security practice to implement this type of behavior. You may want to look at your overall goal and determine if it's worth making such a change.

Thank you.
 

vibol

Active Member
Jan 21, 2014
27
0
1
cPanel Access Level
Root Administrator
Re: About php session

I just wanted to point out that it's likely not a good security practice to implement this type of behavior. You may want to look at your overall goal and determine if it's worth making such a change.

Thank you.
Understand thz for your recommended. But i want when my user login with mydomain.com they can access sub.mydomain.com without re-login again. thz