#31401 [Opn->Bgs]: corrupted $_SESSION variable
| From: | sniper@php.net | Date: | Tue, 04 Jan 2005 07:01:54 +0000 |
| Subject: | #31401 [Opn->Bgs]: corrupted $_SESSION variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-71442@lists.php.net to get a copy of this message | ||
ID: 31401
Updated by: sniper@php.net
Reported By: mleon at scientificinformatics dot com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Linux (Mandrake 10.0)
PHP Version: 4.3.8
New Comment:
Set php.ini option "register_globals" to off.
You could also avoid this 'bug' by using some other variable name than
$temppdf..
No bug here.
Previous Comments:
------------------------------------------------------------------------
[2005-01-04 06:44:53] mleon at scientificinformatics dot com
Description:
------------
After using $_SESSION['i'] as an argument to file_get_contents(),
$_SESSION['i'] value is replaced by the file loaded with
file_get_contents()
Reproduce code:
---------------
session_start();
$_SESSION['temppdf']="reports/processed/temp-33689592941d9fbfcca184.pdf";
echo "<br>SESSION['temppdf']: ".$_SESSION['temppdf'];
$temppdf = file_get_contents($_SESSION['temppdf']);
echo "<br>SESSION['temppdf']: ".$_SESSION['temppdf'];
Expected result:
----------------
SESSION['temppdf']: reports/processed/temp-33689592941d9fbfcca184.pdf
SESSION['temppdf']: reports/processed/temp-33689592941d9fbfcca184.pdf
Actual result:
--------------
SESSION['temppdf']: reports/processed/temp-33689592941d9fbfcca184.pdf
SESSION['temppdf']: %PDF-1.4 3 0 obj <> endobj 4 0 obj <> stream
x¥VMÜ0 ½Ï¯ÐqZ%[...............
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31401&edit=1