#38833 [NEW]: $_SESSION looses its ability to set session variables
| From: | php at arcannon dot com | Date: | Thu, 14 Sep 2006 17:40:41 +0000 |
| Subject: | #38833 [NEW]: $_SESSION looses its ability to set session variables | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-102196@lists.php.net to get a copy of this message | ||
From: php at arcannon dot com
Operating system: Fedora Core 5
PHP version: 5CVS-2006-09-14 (CVS)
PHP Bug Type: Session related
Bug description: $_SESSION looses its ability to set session variables
Description:
------------
$_SESSION looses its ability to set session variables when I do
$anythinghere = $_SESSION; This only happens when register_long_arrays =
Off
Reproduce code:
---------------
<?
// Bug with Sessions ?
// PHP Version 5.1.5
// Operating System: Fedora Core 5
// Only happens when register_long_arrays = Off
session_start();
echo "session_id: ".session_id()."<br />";
if(!array_key_exists('counter',$_SESSION)) { $_SESSION['counter'] = 0; }
$anythinghere = $_SESSION;
echo $_SESSION['counter'];
// Play with commenting out these 2 lines and refreshing your page.
// $anythinghere['counter']++;
$_SESSION['counter']++;
?>
Expected result:
----------------
I expect that the session counter to increment on a page reload, but it
does not.
Actual result:
--------------
The session counter does not increment.
--
Edit bug report at http://bugs.php.net/?id=38833&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38833&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38833&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38833&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38833&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38833&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38833&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38833&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38833&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38833&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38833&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38833&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38833&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38833&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38833&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38833&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38833&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38833&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38833&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38833&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38833&r=mysqlcfg