I have a few websites on the same server with the following domains with the PHP session domain set to '.example.com' so the cookie is shared between the two websites:
- example.com
- shop.example.com
I also have a separate server with the following domain admin.example.com and want it to use its own session/cookie. But when there is a .example.com cookie, the admin.example.com website tries using that value instead of its .admin.example.com cookie value, causing session issues...
If I were to delete the .example.com cookie, the website works as intended by using the correct .admin.earlowen.com value.
I have set session.cookie_domain to .admin.example.com to no avail. Am I missing anything? Or is just not possible.
admin.example.comserver inside a web directory create a script with code:<? phpinfo(); ?>and run it. What values are displayed for thesession.cookie_domainoption?.admin.example.comLocal valueand/orMaster valuein data fromphpinfo()oppositesession.cookie_domaindirective?