From: piero dot mac at gmail dot com
Operating system: WIN XP HOME sp2
PHP version: 5.0.4
PHP Bug Type: Session related
Bug description: Session saved file empty.
Description:
------------
When using $_SESSION in order to transfer POST form informations to others
or to the same page with refresh, and data transfert from $_POST to
$_SESSION has done as the follow:
$_SESSION = $_POST;
No data session will be stored into session save data file.
Session file is empty.
This problem didn't exist to previous php releases.
Reproduce code:
---------------
<?php
session_start();
// any POST data incoming from FORM is true
if(isset($_POST)) {
$_SESSION = $_POST;
} else {
$_POST = $_SESSION; }
print_r($_POST);
print_r($_SESSION);
?>
Please, try to page refresh now
Expected result:
----------------
I'm waiting for the same value printed as the first time to any following
refresh.
Actual result:
--------------
Problem is possible to bypass with previus creation of empty $_SESSION
$_SESSION = array();
or to transfer to $_SESSION all values one by one (using foreach).
--
Edit bug report at http://bugs.php.net/?id=33585&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33585&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33585&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33585&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33585&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33585&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33585&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33585&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33585&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33585&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33585&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33585&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33585&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33585&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33585&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33585&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33585&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33585&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33585&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33585&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33585&r=mysqlcfg