#38082 [NEW]: $_SERVER['REQUEST_URI'] print different string in the same script

From: Date: Wed, 12 Jul 2006 16:38:02 +0000
Subject: #38082 [NEW]: $_SERVER['REQUEST_URI'] print different string in the same script
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99346@lists.php.net to get a copy of this message
From: antonio dot riva at gmail dot com Operating system: Linux PHP version: 4.4.2 PHP Bug Type: Output Control Bug description: $_SERVER['REQUEST_URI'] print different string in the same script Description: ------------ when i load a page with a url like this "test.php/ciao/ciao/ciao" i want to execute the script test.php and store the content of $_SERVER['REQUEST_URI'] in a the session array or in a file... the problem is that the browser execute a new request for the favicon and the url is saved in the file or in the session but if i print the $_SERVER['REQUEST_URI'] to screen it shoe the right value Reproduce code: --------------- <?php session_start(); ?> <html><head> <link rel="shortcut icon" href="./favicons.ico"/> </head><body> <? $string = $_SERVER['REQUEST_URI']; $f=fopen("temp",'w'); fwrite($f,$string); fclose($f); $_SESSION['variabile']=$string; echo "<b>variabile:</b> ".$_SESSION['variabile']; ?> </body></html> this is the url that generate the bug: test.php/ciao/ciao/ciao Expected result: ---------------- test.php/ciao/ciao/ciao in the file test.php/ciao/ciao/ciao to screen Actual result: -------------- test.php/favicons.ico in the file test.php/ciao/ciao/ciao to screen -- Edit bug report at http://bugs.php.net/?id=38082&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38082&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38082&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38082&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38082&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38082&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38082&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38082&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38082&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38082&r=support Expected behavior: http://bugs.php.net/fix.php?id=38082&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38082&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38082&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38082&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38082&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38082&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38082&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38082&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38082&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38082&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38082&r=mysqlcfg

« previous php.bugs (#99346) next »