I need to share login status across subdomains in one install. For example, after I login in main site: localhost/dx/, but when I visit test.localhost/dx/ (I remove 'redirect_canonical' to stop automatically redirecting to main site), it's the same page, but I'm not logged in. I figured that it's the cookie problem, I tried to set
define('COOKIE_DOMAIN', '.loclhost'); // or loclhost
define('COOKIEPATH', '/');
define('SITECOOKIEPATH', '/');
but still not remain logged in subdomains.
Anyone has a solution for this?