The root of your problem is that sessions generally do not traverse
multiple domains. A possible solution is to embed an image in each of
the servers which references a PHP script in the other server, and while
doing so passes the sessionID along.

On server abc.foo.org you might have the following:

<image src="http://xyz.foo.org/sessionMap.php?sessionId=123456789"; />

While on server xyz.goo.org you would have the following:

<image src="http://abc.foo.org/sessionMap.php?sessionId=123456789"; />

What this does is create a session on the other server even though the
user has not "seemingly" visited it. By passing the original session ID
you indicate the session ID that should be used for the new session and
thus bypass any session ID generation. Then if the user visits that site
they will already be set up, and provided the session data is stored in
the same database for each site then all information will be
transferable.

The image which accesses the other server's sessionMap.php script would
only need to be output to the browser when a new session is created.

HTH,
Rob.


On Thu, 2003-08-14 at 13:29, [EMAIL PROTECTED] wrote:
> Dear Sir,
> 
> I've been using PHP for business and personal use for a while now, and I
> have to admit, I'm not just a user anymore and I am a fan. but it's been a
> while I came across a problem : I use session variables a lot for security
> purposes but I notice that PHP doesn't hold the session variables when I
> go from one URL to another URL.These are 2 different domains but located
> on the same server and in my php.ini I set a separate temp folder outside
> of both of those domains' folders,
> do you have any idea how I can solve this problem ?...so far the only
> solution I've found is that I pass the session ID to that page that's on
> the other server and then I can get access to session variables. It's just
> that if the person who is already logged in my system and they type in a
> different URL which is part my system also it's just a different URL , I
> lose them.
> 
> Any help is apprieciated,
> 
>  Sincerely
>    Babak P.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to