Re: Emulation: If I wanna test cross domain session between 2 domains,
- From: "ZeldorBlat" <zeldorblat@xxxxxxxxx>
- Date: 17 Jan 2006 08:17:21 -0800
stevong wrote:
> Im doing development on a Linux machine.
> One request is to have cross domain sessions. As in: host1.com and
> host2.com shares the same sessions so user do not have to login twice.
>
> I need to emulate the enviroment. I have set up a test system:
>
> My setup:
>
> I have a network interface with an alias.
> My main ip is 192.168.1.10. I created an alias of it as 192.168.1.100.
>
> Under my /etc/hosts/
>
> I've added 2 entries:
>
> 192.168.1.10 host1
> 192.168.1.100 host2
>
> So in my browser, I keyed in http://host1 or http://host2; I would be
> achieving an emulation of cross domain sessions?
>
> Am I right? Or I was just being foolish. please advise
>
> Thanks and Regards,
> Steven.
If both domains (virtual hosts) are running on the same web server, you
shouldn't need to do anything besides:
-- Make sure the cookie domain isn't set (either in php.ini or via
ini_set)
-- Make sure the valid cookie path isn't set (unless it can be the same
for both domains)
-- If using named sessions, use the same name for both sites.
.
- References:
- Prev by Date: Re: Regular Exception - problem with preg match
- Next by Date: Re: PASSING VARIABLES...
- Previous by thread: Re: Emulation: If I wanna test cross domain session between 2 domains,
- Index(es):