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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 03 11:00:01 2025 UTC