PHP session cookies in a subdomain using IE11/Safari

Posted December 21, 2014 3.3k views

I’m losing the session between redirects in both Internet Explorer 11 and Safari (works fine on Chrome, Opera and Firefox).

When I try to login using the error occurs on IE/Safari, but even on them it works fine if I use the IP (

I’m trying to setup the session like:

session_set_cookie_params(3600, '/folder/');

I have already tried:

session_set_cookie_params(3600, '/folder/', ';
session_set_cookie_params(3600, '/folder/', ';
session_set_cookie_params(3600, '/folder/', ';  <-- without the preceding dot
session_set_cookie_params(3600, '/folder/', ';
ini_set("session.cookie_domain", ""); <-- before set_cookie_params

But none of them seems to work.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I am not able to speak to Safari but IE11 and Edge have removed some cross domain functionality intentionally. More information about this change can be found here and here.