According to the PHP docs
(http://php.net/manual/en/session.configuration.php#ini.session.cookie-domain),
session.cookie_domain's default value is set to the domain that
generated the cookie.
Default is none at all meaning the host name of the server which
generated the cookie according to cookies specification
Ok, so how do I set session.cookie_domain to use the cookie on
subdomains and on the original domain which generated the cookie
without having to specifically specify it?
I'm looking for something like
session.cookie_domain = .[$SERVER_NAME]
Instead of having to specifically state which domain it is like
countless other examples have used:
session.cookie_domain = .example.com
Since my server will be hosting multiple domains, is there a way to
get this setting to be set dynamically based on the host that
generated the cookie to use the cookie on subdomains and the domain
itself in the php.ini configuration?
PHP Sessions across sub domains appears to be similar to what I'm
after, but I don't want to have to set it in the script. I want to set
it in the php.ini configuration so that cookies issued from any of my
hosted domains will also be used and valid for their corresponding
subdomains.