Then turn it off? "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > When i have someone deactivating the cookies i get multiple PHPSESSIONID > queries. > > What i do: I have a site that propageates some data with query strings. > These i read from > $_SERVER['QUERY_STRING'], modify and write them back as href. Everything is > working > fine but when cookies are disabled i have the PHPSESSIONID repeated. > > Example from logfile: > 137.226.156.172 - - [17/Jun/2002:22:03:24 +0200] "GET > /?4&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID=8db991d1a3b1ee1a7a4 97b7644956085&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID=8db991d1a 3b1ee1a7a497b7644956085&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID =8db991d1a3b1ee1a7a49 > 7b7644956085&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID=8db991d1a3 b1ee1a7a497b7644956085 > HTTP/1.1" 200 2675 > "/?3&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID=8db991d1a3b1ee1a7a 497b7644956085&PHPSESSID=8db991d1a3b1ee1a7a497b7644956085&PHPSESSID=8db991d1 a3b1ee1a7a49 > > Example code snippet: > > $server_query = $_SERVER['QUERY_STRING']; > $pos = strpos($server_query,'&'); > $q_ext = ''; > if ($pos !== false) { > $extern_query = substr($server_query,$pos); > } else { > $extern_query = ''; > } > $idx_href = './?-'.$extern_query; > > echo "<a href='$idx_href'>" ...... > > What i do is cutting the first query entry which i allways have. Setting a > new one > and adding rest of original query. > > Suppose i have "/?4" this would be rewritten with session id to > "/?4&PHPSESSID=xxx" > The snipped above sees '&' present and sets $extern_query to "&PHPSESSID=xxx". > Then it sets $idx_ref to "./?-&PHPSESSID=xxx" > > So i suggest there could be something wrong with detection of query strings > that have > entries without an equal sign? > > Any hints what i am doing wrong or what is wrong? > > marcus > > > > --------->>> mailto:[EMAIL PROTECTED] <<<------------ > "Wir sind allzumal Tiere unter Tieren, Kinder der Materie wie sie, > nur wehrloser. Doch da wir im Unterschied zu den Tieren wissen, > dass wir sterben muessen, wollen wir uns auf jenen Augenblick vorbereiten, > indem wir das Leben geniessen, das uns durch Zufall und vom Zufall gegeben > ist." > Umberto Eco, Die Insel des vorigen Tages > --------------->>> http://www.marcus-boerger.de <<<------------------- > ---------->>> Tel. 0241 / 874 09-7 ### 0179 / 29 14 980 <<<----------
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php