chantown Posted December 22, 2007 Share Posted December 22, 2007 Why is it that when people login to my website in www.domain.com, when they go to domain.com, the Sesssion doesn't carry over?? www.domain.com and domain.com the sessions are not the same, and they have to relogin to domain.com? Can someone help me so they can both use the same session? Link to comment https://forums.phpfreaks.com/topic/82852-sessions/ Share on other sites More sharing options...
papaface Posted December 22, 2007 Share Posted December 22, 2007 www.domain.com is actually a subdomain on your hosting account. The REAL domain is domain.com Most hosts these days simply have www.domain.com redirect (internally) to your root file area. Therefore PHP treats them as two different places. (well thats what I've learned to be true anyway lol) Link to comment https://forums.phpfreaks.com/topic/82852-sessions/#findComment-421380 Share on other sites More sharing options...
PFMaBiSmAd Posted December 22, 2007 Share Posted December 22, 2007 If you set session.cookie_domain to be .domain.com then a session cookie will be available to any sub-domain of domain.com. Link to comment https://forums.phpfreaks.com/topic/82852-sessions/#findComment-421387 Share on other sites More sharing options...
chantown Posted December 23, 2007 Author Share Posted December 23, 2007 o i c, how do i set this? Is this in PHP.ini? Link to comment https://forums.phpfreaks.com/topic/82852-sessions/#findComment-421501 Share on other sites More sharing options...
trq Posted December 23, 2007 Share Posted December 23, 2007 o i c, how do i set this? Is this in PHP.ini? Yes. Link to comment https://forums.phpfreaks.com/topic/82852-sessions/#findComment-421546 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.