W
W
WEBIVAN2014-05-29 15:48:42
Sessions
WEBIVAN, 2014-05-29 15:48:42

Why is the session on a subdomain overwritten when entering the main domain?

We have 3
example.com
domains a.example.com
b.example.com
Each domain uses a common cross-domain session:

session_set_cookie_params(604800, '/', '.example.com');

Everything worked great. Until we moved to a new server (all 3 sites moved together to the same server).
Cookies are set fine, but sessions behave strangely. We log in to a.example.com and do not go to another domain yet, everything is OK, but as soon as we go to example.com or b.example.com, the content of the session is cleared, but the cookie remains unchanged (set for the .example.com domain) .
What in the settings of Apache or PHP can lead to such behavior?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question