|
Posted by Edward Vermillion on 07/18/05 18:29
Andy Pieters wrote:
> Ok found the solution, seems like one page is on http://server.org.uk and the
> other on www.server.org.uk even though its the same server it generates a
> different session id!
>
That's a cookie thing, if your transmitting the session ids through
cookies, I'm going to assume that trans sid will do the same thing. The
deal is that when you go to server.org it's not going to have access to
a cookie set on www.server.org. I've had this happen to me too. I set a
variable like
$http_root = 'http://www.myserver.com/'
and then the links I generate have
$link = $http_root."newpage.php"
If the site is accessed at http://myserver.com then the links don't get
the right cookie.
the best thing to do is to set
$http_root = 'http://'.$_SERVER['SERVER_NAME']
,or whatever you have available in $_SERVER, then the links are all set
correctly. Or you can use relative paths like
$link = "index.php"
and the right cookie will be set/read.
Navigation:
[Reply to this message]
|