#28256 [Opn->Bgs]: trans-sid not reliable (irregular appendix to absolute url on localhost)

From: Date: Wed, 26 Jan 2005 03:50:47 +0000
Subject: #28256 [Opn->Bgs]: trans-sid not reliable (irregular appendix to absolute url on localhost)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72837@lists.php.net to get a copy of this message
ID: 28256 Updated by: sniper@php.net Reported By: webmaster at roydencom dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Linux MDK10 PHP Version: 5.0.0RC2 New Comment: User error. (don't try to outsmart the tool..just code the way you're supposed to code: RTFM) Previous Comments: ------------------------------------------------------------------------ [2004-05-03 01:41:15] webmaster at roydencom dot com it's not true that the extra &PHPSESSIS dissapears. I do not get it awy. I do not think it's different on a remote host. ------------------------------------------------------------------------ [2004-05-03 00:53:34] webmaster at roydencom dot com Description: ------------ Even if I'm runing smarty I think the following issue is clearly php-related. For mod_rewrite-reasons I need absolute url here so although having trans-sid enabled I have to append the SID myself: it looks as if php tries to add the sessionid in just one case (not every time the same one) despite of having an absolute url. if I add an any masked entity like &nbsp; the extra &PHPSESSID=dissapears. Reproduce code: --------------- //smarty initialisation in an include if(empty($_COOKIE[CCNAME])) $this->assign("sessionstring","?".SID); $this->assign("servername",$_SERVER["SERVER_NAME"]); //in the template {foreach from=$nav_produkte item=menupunkt} <a href="http://{$servername}/produkte/{$menupunkt.urlname}.html{$sessionstring}">{$menupunkt.displayname|default:$menupunkt.urlname}</a><br> {/foreach} Expected result: ---------------- <a href="http://myhost.local/produkte/indien.html?PHPSESSID=ep0od8amd17te5132usq3f0l73">Indien</a><br> <a href="http://myhost.local/produkte/thailand.html?PHPSESSID=ep0od8amd17te5132usq3f0l73">Thailand</a><br> <a href="http://myhost.local/produkte/china.html?PHPSESSID=ep0od8amd17te5132usq3f0l73">China</a> Actual result: -------------- href="http://myhost.local/produkte/indien.html?PHPSESSID=ep0od8amd17te5132usq3f0l73">Indien</a><br> <a href="http://myhost.local/produkte/thailand.html?PHPSESSID=ep0od8amd17te5132usq3f0l73"&PHPSESSID=ep0od8amd17te5132usq3f0l73>Thailand</a><br> <a href="http://myhost.local/produkte/china.html?PHPSESSID=ep0od8amd17te5132usq3f0l73">Astro</a><br>k23bn50u6">China</a><br> //because smarty-side $sessionstring being "?PHPSESSID=.+" it looks like a clear php-misbehaviour ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28256&edit=1

« previous php.bugs (#72837) next »