I have a domain myexampledomain.com
with some subdomains in it.
So I set
session.cookie_domain = .myexampledomain.com
and everything works fine for the domain and all the subdomain.
But this is set in php.ini
so it is at server level. Now I want to configure a new domain on the same server. Say myotherdomain.com
. I want this other domain to handle its own cookies without mixing with myexampledomain.com
This question is about sharing the cookie between the two domains, I want it to be the opposite. How can I do it? The two domains have indipendent login systems and once the user is logged in a cookie is set. I want to set both cookies but each of them should be valid only for that domain. How should I change the php.ini for that? I think that session.cookie_domain = .myexampledomain.com
will prevent to set cookies for myotherdomain.com
EDIT: I know how to handle this on the lower level (code level - php files) but I want to understand if there is a way to handle this at php.ini level (if this is feasible)