Re: Sessions problem

From: Date: Mon, 10 Mar 2003 20:37:40 +0000
Subject: Re: Sessions problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139024@lists.php.net to get a copy of this message
I believe there's a domain limitation inherent to the way cookies work (assuming a cookies-based sessions setup), but there may be some way of circumventing that (can't some ad banner companies track visitors from site to site?). Seems like a multi-file search and replace should do the trick. If you're using UltraEdit/BBEdit/Emacs you should be able to update your links without too much effort. HTH, -Dan "David Chamberlin" <dwc@nautiboy.com> wrote in message news:20030310195831.72574.qmail@pb1.pair.com... > Hey all, > > Some of my users have reported a problem with my site and it's taken a > while to debug it, but I think I've finally tracked it down. > > If they go to the site as: > > http://www.mysite.org/ > > Then it works > > But if they go as: > > http://mysite.org/ > > It doesn't. > > I believe it has to do with my use of session variables. Apparently (I > didn't know this, but it's obvious from the debugging) that there are > different session ID's and thus different session variables for the two. > And the problem is (due to sloppy programming on my part ... sigh > ...) that sometimes I set up the links as <a href="/<page>"> and > sometimes I do the explicit <a > href="http://www.mysite.org/<page>">. So > when it goes to the link as www.mysite.org, it registers the variables, > but then later when it tries to access and it's just mysite.org, the > variables aren't set. Lots of confusion ensues. > > Is there any way to unify this, or do I have to go through and fix all > of the absolute links to be relative? > > Thanks, > Dave >

« previous php.general (#139024) next »