#33585 [Opn->Fbk]: Session saved file empty.

From: Date: Wed, 06 Jul 2005 10:21:42 +0000
Subject: #33585 [Opn->Fbk]: Session saved file empty.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81456@lists.php.net to get a copy of this message
ID: 33585 Updated by: tony2001@php.net Reported By: piero dot mac at gmail dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: WIN XP HOME sp2 PHP Version: 5.0.4 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Can't reproduce. Please set display_errors to On and error_reporting to E_ALL in your php.ini and see if there are any error messages. Previous Comments: ------------------------------------------------------------------------ [2005-07-06 11:58:27] piero dot mac at gmail dot com 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 this bug report at http://bugs.php.net/?id=33585&edit=1

« previous php.bugs (#81456) next »