php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42335 session
Submitted: 2007-08-18 11:14 UTC Modified: 2007-08-19 19:55 UTC
From: lgynove at 163 dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.3 OS: windows xp
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lgynove at 163 dot com
New email:
PHP Version: OS:

 

 [2007-08-18 11:14 UTC] lgynove at 163 dot com
Description:
------------
<?php
//php 5.2.1
//[php.ini]
//register_long_arrays = Off

session_start();

$_SESSION['test']['a'] = 'ok';
$_SESSION['test']['b'] = 'ok';
$_SESSION['test']['c'] = 'ok';
$_SESSION['test']['d'] = 'ok';
$_SESSION['test']['e'] = 'ok';

function test()
{
	print_r($GLOBALS['test']);
}

register_shutdown_function('test');
?>
<img src="" />

<?php
/*
output:

<img src="" />

Array
(
    [a] => ok
    [b] => ok
    [c] => ok
    [d] => ok
    [e] => ok
)
*/
?>

Reproduce code:
---------------
<?php
//php 5.2.1

session_start();

$_SESSION['test']['a'] = 'ok';
$_SESSION['test']['b'] = 'ok';
$_SESSION['test']['c'] = 'ok';
$_SESSION['test']['d'] = 'ok';
$_SESSION['test']['e'] = 'ok';

function test()
{
	print_r($GLOBALS['test']);
}

register_shutdown_function('test');
?>
<img src="" />

Expected result:
----------------
<img src="" />

Array
(
)

Actual result:
--------------
<img src="" />

Array
(
    [a] => ok
    [b] => ok
    [c] => ok
    [d] => ok
    [e] => ok
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-19 19:55 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Dec 04 22:00:01 2025 UTC