Is the default domain for a php session cookie always the same as $_SERVER['HTTP_HOST']. Where can I find this information in the php manual? It seems to be $_SERVER['HTTP_HOST'], but I would like verification.
Asked
Active
Viewed 127 times
0
-
By default the domain is empty and that information is simply not sent to the client. Consult the HTTP specification and/or your browser documentation to find out what this means for you. – Lightness Races in Orbit Aug 02 '14 at 13:58
1 Answers
0
the cookie is set by the browser and depends on the domain open on it. It is the same as $_SERVER['HTTP_HOST'] but that doesn't mean that you can change the variable to change the domain of the session cookie.

georoot
- 3,557
- 1
- 30
- 59
-
I am seeing Set-Cookie:PHPSESSID=28jodee15pbunp7nddgm466sa7; path=/ in the response headers, so I don't think it is set by the browser. I am just interested to know how it picks the domain. – Chris Muench Aug 02 '14 at 23:25