|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-21 20:41 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 02:00:01 2025 UTC |
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; ?>