darkywarkey Posted January 3, 2009 Share Posted January 3, 2009 Having a problem when using sessions. If I define a session global it works fine unless the www. subdomain is different from the defined sessions origin. Such as - $_SESSION['var1'] = 1; // defined on www.domain.com ... // on domain.com $_SESSION['var1'] isn't recognized. How can you allow sessions to be visible across both? Link to comment https://forums.phpfreaks.com/topic/139309-sessions-and-domains/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 3, 2009 Share Posted January 3, 2009 By setting the "domain" portion of the cookie parameters - http://www.php.net/manual/en/function.session-set-cookie-params.php Link to comment https://forums.phpfreaks.com/topic/139309-sessions-and-domains/#findComment-728638 Share on other sites More sharing options...
darkywarkey Posted January 4, 2009 Author Share Posted January 4, 2009 Works now, thanks. Link to comment https://forums.phpfreaks.com/topic/139309-sessions-and-domains/#findComment-729240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.