1

The following code sets the session cookie as follow:

ini_set( 'session.cookie_domain', 'mysite.com' );
  • FF header - domain=.mysite.com
  • IE header - domain=mysite.com (no initial dot)
  • Cr header - domain=.mysite.com

The following code sets the session cookie as follow:

ini_set( 'session.cookie_domain', 'dev.mysite.com' );
  • FF - domain=.dev.mysite.com (works)
  • IE - domain=mysite.com (ignores subdomain; uses root domain, no initial dot)
  • Cr - failed to create session

Trying to set the Session cookie to a particular subdomain, so that sub1.dev.mysite.com, sub2.dev.mysite.com could access the same Session cookie. But, it only works with FF.


Set session name to something like SESS_NAME.

walterquez
  • 349
  • 2
  • 11
  • See http://stackoverflow.com/questions/795414 and http://stackoverflow.com/questions/644920 if you haven't already. – Amal Murali Jun 25 '13 at 22:58
  • Thanks. Unfortunately, none of their solutions works. It looks like this is a browser issue, because of how each implements it in their output. For example, Chrome does not even work if I include a subdomain. It works fine with FF. And IE ignores it and uses the root domain instead. Is it possible that Chrome and IE is missing something in the header that they are unable to properly process it? And FF uses default values? – walterquez Jun 26 '13 at 12:29
  • From Fiddler, the raw header is the same on all browsers. Here I am setting it to dev.mysite.com `HTTP/1.1 200 OK Date: Tue, 25 Jun 2013 19:48:39 GMT Server: Apache Set-Cookie: SESS_NAME=70nd4k6n1c8c1jt899sm1rk1d7; path=/; domain=dev.mysite.com Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Status: 200 Vary: Accept-Encoding Content-Length: 74632 Keep-Alive: timeout=3, max=100 Connection: Keep-Alive Content-Type: text/html` – walterquez Jun 26 '13 at 13:41

1 Answers1

1

Interesting, I found that Chrome does not like underscore. SESS_NAME vs SESSNAME.

walterquez
  • 349
  • 2
  • 11