php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23771 4.3.2RC4 breaks SESSION handling
Submitted: 2003-05-23 04:53 UTC Modified: 2003-05-23 05:35 UTC
From: fdsoft at pganet dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.2RC4 OS: Red Hat Linux 7.3
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: fdsoft at pganet dot com
New email:
PHP Version: OS:

 

 [2003-05-23 04:53 UTC] fdsoft at pganet dot com
PHP 4.3.2RC4's session handling seems to be broken. This did not occur with RC3 or any PHP version which came before.

The problem seems to be in storing floats in a SESSION.

Sample code:

// floattest1.php:

<?php
session_start();
$_SESSION['test1'] = 'abcdefg';
$_SESSION['blah'] = 6542.2;
$_SESSION['test2'] = 'gfha';
header('location: floattest2.php');
?>

// floattest2.php:

<?php
session_start();
echo '<pre>';
var_dump($_SESSION);
?>


floattest2's output with 4.3.2RC1 (perfectly good):
array(3) {
  ["test1"]=>
  string(7) "abcdefg"
  ["blah"]=>
  float(6542.2)
  ["test2"]=>
  string(4) "gfha"
}

4.3.2RC4's buggy output:
array(3) {
  ["test1"]=>
  string(7) "abcdefg"
  ["blah"]=>
  float(6542.2)
  [";test2"]=>
  string(4) "gfha"
}

Notice that "test2" somehow got changed to ";test2".
Take a more complex SESSION with more stuff stored inside and you'll see even more weird results. Values changing place with keys and vice versa, variables getting their values unexpectedly changed to NULL and so on.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-23 05:11 UTC] mgf@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

See bug #23761 -- already fixed.  A 5-second search would have found you that.
 [2003-05-23 05:26 UTC] fdsoft at pganet dot com
Obviously I did search for "session float" and came up empty.
 [2003-05-23 05:35 UTC] derick@php.net
leave it as bogus
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 13:00:02 2026 UTC