#33811 [Bgs]: session file is not written under certain circumstances

From: Date: Thu, 21 Jul 2005 22:03:21 +0000
Subject: #33811 [Bgs]: session file is not written under certain circumstances
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82297@lists.php.net to get a copy of this message
ID: 33811 User updated by: hartmann at mayflower dot de Reported By: hartmann at mayflower dot de Status: Bogus Bug Type: Session related Operating System: Windows XP PHP Version: 5.0.4 New Comment: Nicer reproduction code: <?php // set register_globals and register_long_arrays to off to reproduce session_start(); if (!isset($_SESSION['i'])) $_SESSION['i'] = 0; if ((ini_get('register_globals') != 'On')) { foreach ($_SESSION as $key=>$nil) { $GLOBALS[$key] =& $_SESSION[$key]; } } $i++; echo $i; ?> Previous Comments: ------------------------------------------------------------------------ [2005-07-21 23:41:51] hartmann at mayflower dot de Please read my bug report again. The session is started, and there is data in $_SESSION - but the session file is 0 bytes. The bug does not happen if register_globals is off and register_long_arrays is set to on. ------------------------------------------------------------------------ [2005-07-21 20:47:24] 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 It happens *exactly* because register_globals is Off and that's well expected. ------------------------------------------------------------------------ [2005-07-21 20:41:41] hartmann at mayflower dot de Description: ------------ If register_globals and register_long_arrays is Off (as in php.ini-recommended), under certain circumstances _SESSION data does not get saved. Reproduce code: --------------- http://thinkforge.org/snippet/detail.php?type=snippet&id=11 Expected result: ---------------- $_SESSION['i'] is incremented with every request Actual result: -------------- $_SESSION[i] does not get incremented, session file is 0 bytes. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33811&edit=1

« previous php.bugs (#82297) next »