i've a problem with session on my multi-domain website.
In fact, i've :
- www.website.com
and
- my-account.website.com
In the php.ini, i've set : session.cookie_domain = ".website.com"
I check if it correctly change with phpinfo();
and it's ok, i've well the same value for both website (domaine and sub-domain) :
the same
session.cookie_domain
,session.save_path
,session.cookie_path
.session.cookie_lifetime
= 0 andsession.cookie_secure
is off
Well, now, when i try some test :
- Define a session_name on www.website.com, start the session, define un session value like
$_SESSION["test"] = "myvalue";
and i display the session_id. - Go to my-account.website.com and open the session with the same session name, i check the session id and i found the same id with www.website.com, but i have lost the session value that i defined. S_SESSION["test"] is lost.
Conclusion, the session id is kept, but sessions values are lost.
Any idea ? I have check to change with session_set_cookie_params(0, '/', '.website.com');
on each website. And also try to use the htaccess php_value session.cookie_domain ".website.com"
HELP, THAT MADE ME CRAZY.