ID: 33811 Updated by: [EMAIL PROTECTED] Reported By: hartmann at mayflower dot de Status: Bogus Bug Type: Session related Operating System: Windows XP PHP Version: 5.0.4 New Comment:
Never EVER do anything like that! This is expected to fail if you try outsmarting the session engine. Previous Comments: ------------------------------------------------------------------------ [2005-07-22 00:03:19] hartmann at mayflower dot de 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; ?> ------------------------------------------------------------------------ [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] [EMAIL PROTECTED] 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