php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32781 session_start() outputs newline character when complex object used in session
Submitted: 2005-04-20 20:28 UTC Modified: 2005-04-29 01:00 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: douglas dot day at calendarsystems dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.0.3 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: douglas dot day at calendarsystems dot com
New email:
PHP Version: OS:

 

 [2005-04-20 20:28 UTC] douglas dot day at calendarsystems dot com
Description:
------------
I assign a complex object as a session variable, then the next time session_start() is called, it outputs a newline character (which should never happen).  

If I don't assign this object as a session variable, session_start() functions normally.  Any other action I've taken with $_SESSION produces the same results, unless I assign the complex object.

Reproduce code:
---------------
// Page 1
$_SESSION["var"] = new MyComplexObject();

// Page 2
ob_start();
$len_before = ob_get_length();
session_start();
$len_after = ob_get_length();
ob_end_flush();

echo $len_before . "," . $len_after;

Expected result:
----------------
Output: 0,0

Actual result:
--------------
Output: [newline]
0,2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-21 12:47 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-04-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 21:01:30 2024 UTC