php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43423 $_SESSION variable has its elements being referenced.
Submitted: 2007-11-27 10:08 UTC Modified: 2007-11-27 10:13 UTC
From: leandroico at gmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.5 OS: Linux box331.bluehost.com 2.6.22
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: leandroico at gmail dot com
New email:
PHP Version: OS:

 

 [2007-11-27 10:08 UTC] leandroico at gmail dot com
Description:
------------
Actually the PHP version encountered this apparently bug is 5.1.6, but I haven't found that option at the select box above.

On he other hand, on my developer machine (using windows xp/apache/php 5.2) I haven't the presence of this anomaly.

THE PROBLEM:
$_SESSION variables (the direct elements of $_SESSION), when "var_dumped", is noticed that they (each $_SESSION element) are being referenced somehow, because the presence of the '&' before the variable type on var_dump output. And because this phenomena I'm having big trouble, making clear I can't update server's php version.

Reproduce code:
---------------
var_dump($_SESSION);

Expected result:
----------------
array(9) {
  ["usr1d"]=>
  string(2) "68"
  ["tat"]=>
  string(1) "7"
  ["grupo"]=>
  string(5) "ativa"
  ["agenc"]=>
  string(2) "RJ"
  ["nam3"]=>
  string(23) "Manoel Carlos M. Corr?a"
  ["ema1l"]=>
  string(17) "mcarlos@ativa.net"
  ["idiom"]=>
  string(2) "pt"
  ["logado"]=>
  string(6) "logado"
  ["consulta"]=>
  &array(0) {
  }
}

Actual result:
--------------
array(9) {
  ["usr1d"]=>
  &string(2) "68"
  ["tat"]=>
  &string(1) "7"
  ["grupo"]=>
  &string(5) "ativa"
  ["agenc"]=>
  &string(2) "RJ"
  ["nam3"]=>
  &string(23) "Manoel Carlos M. Corr?a"
  ["ema1l"]=>
  &string(17) "mcarlos@ativa.net"
  ["idiom"]=>
  &string(2) "pt"
  ["logado"]=>
  &string(6) "logado"
  ["consulta"]=>
  array(0) {
  }
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-27 10:13 UTC] johannes@php.net
The PHP 5.1 series is unsupported. Please update to 5.2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC