Page 1 of 1
Weird url depending on machine
Posted: Wed Aug 01, 2007 1:22 pm
by yacahuma
Hello,
I have a link produced dynamically
on my machine(windows, iis, php5) the link looks like this
Code: Select all
<a href="/pratp/index.php?setlang=en">
on the production machine redhat, apache, php5 it looks like
Code: Select all
<a href="/index.php?setlang=en&__utma=85680728.1232603787.1184855539.1184855539.1184867301.2&__utmz=85680728.1184867301.2.2.utmccn=(referral)|utmcsr=cv.pratp.upr.edu|utmcct=/index.php|utmcmd=referral">
What bothers me even more is that I solved this before(many years ago) and I cant remember how.
Anyone knows why?
Posted: Wed Aug 01, 2007 1:32 pm
by purefan
what operation are you doing to the link? a simple echo perhaps?
Posted: Wed Aug 01, 2007 1:34 pm
by nathanr
looks like you've got an entire urchin cookie strapped to the end or the uri there mate..
Posted: Wed Aug 01, 2007 2:01 pm
by feyd
Yeah, that's urchin's data.
here is the code
Posted: Wed Aug 01, 2007 2:04 pm
by yacahuma
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
The idea here is that no matter in what page I am I could change the language. In order to do that I need the current query string
so
Code: Select all
$query = isset($_SERVER["QUERY_STRING"]) ? $_SERVER["QUERY_STRING"]: '';
$query = HtmlPage::redoUrl(array('PHPSESSID','setlang','submit'));
$enUrl = $_SERVER["PHP_SELF"] . '?setlang=en&' . $query;//english link
$spaUrl = $_SERVER["PHP_SELF"] . '?setlang=spa&' . $query;//spanich link
The redoUrl function just remove key-value pairs that i do not want on the link
Wasn't there something in php.ini to setup if i wanted to see the session if on the url??????
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
it has to be the system
Posted: Wed Aug 01, 2007 2:08 pm
by yacahuma
it has to be the php setup. the code is the same and I dont get that on my machine
Posted: Wed Aug 01, 2007 2:09 pm
by feyd
Urchin has nothing to do with session data.
php.ini has this:
http://php.net/ref.session#ini.session.use-trans-sid
your are right
Posted: Wed Aug 01, 2007 2:13 pm
by yacahuma
Someone must have install the urchin tracker in one of those headers that get added by force in apache.It is the client machine.
That will make sense.