php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8226 Problems with session vars(related to #7772)
Submitted: 2000-12-13 07:47 UTC Modified: 2000-12-14 07:03 UTC
From: martin at netconfigs dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: Linux2.2.16(SuSE7)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martin at netconfigs dot com
New email:
PHP Version: OS:

 

 [2000-12-13 07:47 UTC] martin at netconfigs dot com
Session saved from globals dispite setting register_globals=off although session_encode() does what is expected.

.htaccess:
php_flag register_globals off

php-script resulting in session file: "count|i:4321;"
<?php
 session_register("count");
 $HTTP_SESSION_VARS["count"]=1234;
 $count=4321;
?>

php-script resulting in session file: "!count|"
<?php
 session_register("count");
 $HTTP_SESSION_VARS["count"]=1234;
?>

workaround - last line of script:
while(list($k,$v) = each($HTTP_SESSION_VARS)) ${$k} = $v;


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-13 08:03 UTC] martin at netconfigs dot com
alternative workaround to tie the global and the HTTP_SESSION_VARS item together:
 while(list($k,$v) = each($HTTP_SESSION_VARS)) ${$k} = &$HTTP_SESSION_VARS[$k];
this causes changes to the global to be reflected in the HHTP_SESSIONS_VARS array - and vice-versa
 [2000-12-14 06:47 UTC] stas@php.net
user reports as fixed.
 [2000-12-14 07:03 UTC] martin at netconfigs dot com
To be precise - it appears to be fixed in 'PHP Version 4.0.5-dev'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 08:01:33 2024 UTC