From: mleon at scientificinformatics dot com
Operating system: Linux (Mandrake 10.0)
PHP version: 4.3.8
PHP Bug Type: Session related
Bug description: corrupted $_SESSION variable
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 bug report at http://bugs.php.net/?id=31401&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31401&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31401&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31401&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31401&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31401&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31401&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31401&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31401&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31401&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31401&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31401&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31401&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31401&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31401&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31401&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31401&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31401&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31401&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31401&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31401&r=mysqlcfg