php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: antonio dot riva at gmail dot com
New email:
PHP Version: OS:

 

 [2006-07-12 16:38 UTC] antonio dot riva at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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: Fri Apr 26 11:01:31 2024 UTC