php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10732 Storage of session variable fails
Submitted: 2001-05-08 10:47 UTC Modified: 2001-05-08 13:33 UTC
From: Paul_Kroll at hotmail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.5 OS: Linux
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: Paul_Kroll at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-05-08 10:47 UTC] Paul_Kroll at hotmail dot com
Previously, doing:

<?php
session_register('user');

$user['UserName'] = "this is  a test";
print $user['UserName'];
?>

would result in the browser displaying:

this is a test

In PHP 4.0.5, the browser displays:

t

Which is not quite the expected result.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-08 10:52 UTC] derick@php.net
I could not verify this withphp 4.0.6dev, can you try the lastest snapshot from snaps.php.net?

This was my test:
[root@aarde mp3]# php
<?php
session_register('user');

$user['UserName'] = "this is  a test";
print $user['UserName'];
?>

X-Powered-By: PHP/4.0.6-dev
Set-Cookie: PHPSESSID=435a120c6d20caee178fff903259557d; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

this is  a test
 [2001-05-08 13:33 UTC] Paul_Kroll at hotmail dot com
Not only could I not reproduce this locally from the snapshot of 4.0.6, but I couldn't from a local 4.0.5. But the problem was definitely happening on my web hosting company, which just recently had upgraded to 4.0.5... finally, I did a session_destroy() at the end of the previous test, and on refresh, everything worked fine.

Is the 4.0.5 serialized/session format subtley different from the 4.0.4 format? Seems to from this result. In any case, it does not appear to be a bug in the CODE, though it may be a "lack of documentation of a change that'll cause hair-pulling" bug. :) Safe to close I think.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 02:01:28 2025 UTC