Weird url depending on machine

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Weird url depending on machine

Post 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?
purefan
Forum Newbie
Posts: 15
Joined: Wed Aug 01, 2007 9:35 am

Post by purefan »

what operation are you doing to the link? a simple echo perhaps?
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

looks like you've got an entire urchin cookie strapped to the end or the uri there mate..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yeah, that's urchin's data.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

here is the code

Post by yacahuma »

feyd | Please use

Code: Select all

,

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

,

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]
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

it has to be the system

Post by yacahuma »

it has to be the php setup. the code is the same and I dont get that on my machine
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Urchin has nothing to do with session data.

php.ini has this: http://php.net/ref.session#ini.session.use-trans-sid
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

your are right

Post 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.
Post Reply