guarriman Posted December 14, 2006 Share Posted December 14, 2006 Hi.Working with PHP 4, I want to manage sessions for users visiting 'mydomain2.com' by using a PHP script within 'mydomain1.com' (They both are in the same web server)I find some problems, cause 'mydomain1.com' script doesn't identify user visiting 'mydomain2.com'. I tried to use -------php_value session.cookie_domain "mydomain1.com"------within 'mydomain2.com' Apache configuration, but it doesn't work (I suppose it doesn't anything to do with cookies, right?).Any suggestion is appreciated. Thank you very much. Link to comment https://forums.phpfreaks.com/topic/30629-managing-session-of-mydomain2com-from-mydomain1com/ Share on other sites More sharing options...
uktrips007 Posted December 14, 2006 Share Posted December 14, 2006 in cookies you can specify 2 domain name to transfer your session from one domain to other one if they exist on the same server.setcookie("usuario", "Luis", time()+3600,"/","domain2.com"); and use cookie everywhere to manage session.using $_COOKIE[] Link to comment https://forums.phpfreaks.com/topic/30629-managing-session-of-mydomain2com-from-mydomain1com/#findComment-141066 Share on other sites More sharing options...
Daniel0 Posted December 14, 2006 Share Posted December 14, 2006 The cookie domain sets what domain that may read the cookie set. Therefor if you set it to domain2.com it will allow viewing on domain2.com. Link to comment https://forums.phpfreaks.com/topic/30629-managing-session-of-mydomain2com-from-mydomain1com/#findComment-141076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.