|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38082 $_SERVER['REQUEST_URI'] print different string in the same script
Submitted: 2006-07-12 16:38 UTC Modified: 2006-07-20 15:54 UTC
From: antonio dot riva at gmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.4.2 OS: Linux
Private report: No CVE-ID: None
 [2006-07-12 16:38 UTC] antonio dot riva at gmail dot com
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:
<link rel="shortcut icon" href="./favicons.ico"/>
	$string = $_SERVER['REQUEST_URI'];
	echo "<b>variabile:</b> ".$_SESSION['variabile'];

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-20 15:54 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

This is expected since Apache redirects all requests to the PHP file when you use such URLs.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 21:01:33 2024 UTC