php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23757 name of session variable gets corrupted
Submitted: 2003-05-22 11:48 UTC Modified: 2003-05-22 16:32 UTC
From: tony at marston-home dot demon dot co dot uk Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.2RC4 OS: WindowsXP
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: tony at marston-home dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [2003-05-22 11:48 UTC] tony at marston-home dot demon dot co dot uk
In script #1 I want to store values in $_SESSION so that they will be available to script #2, so I use the script name as the key, as in
$_SESSION['option_enq.php'] = 'whatever';

When script #2 (option_enq.php) starts up it does session_start() then looks in $_SESSION for a value with its name. However, as of 4.3.2RC4 it cannot find it! I examined the contents of $_SESSION with my debugger and it showed me the key name had been changed to ';option_enq.php' - a semi-colon had been added in front.

I ran this through several times and I checked that before leaving the first script that $_SESSION contained the entry without the leading ';', but as soon as script #2 looks at the session array the name has been corrupted.

Here is a copy of the session data file:

expectedscript|s:14:"option_enq.php";prog_stack|a:1:{i:0;s:23:"/xample/option_list.php";}option_list.php|a:8:{s:12:"script_count";i:2;s:5:"where";N;s:9:"selection";N;s:6:"pageno";i:1;s:7:"orderby";N;s:5:"order";N;s:6:"search";N;s:9:"pkeyarray";a:10:{i:1;a:1:{s:9:"option_id";s:8:"ALBATROS";}i:2;a:1:{s:9:"option_id";s:8:"ALIGATOR";}i:3;a:1:{s:9:"option_id";s:8:"BARACUDA";}i:4;a:1:{s:9:"option_id";s:6:"BUMBLE";}i:5;a:1:{s:9:"option_id";s:8:"CHINCHIL";}i:6;a:1:{s:9:"option_id";s:8:"CROCODIL";}i:7;a:1:{s:9:"option_id";s:8:"DINOSAUR";}i:8;a:1:{s:9:"option_id";s:8:"DUCKBILL";}i:9;a:1:{s:9:"option_id";s:8:"ELEPHANT";}i:10;a:1:{s:9:"option_id";s:3:"EMU";}}}script_start|d:1053620791.8506410121917724609375;option_enq.php|a:2:{s:9:"selection";s:22:"(option_id='ALBATROS')";s:14:"orig_selection";s:22:"(option_id='ALBATROS')";}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-22 16:32 UTC] sniper@php.net
See bug #23761 which is about same issue. 
Add your comments there, please.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC