|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-04-20 20:28 UTC] douglas dot day at calendarsystems dot com
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
$len_before = ob_get_length();
$len_after = ob_get_length();

echo $len_before . "," . $len_after;

Expected result:
Output: 0,0

Actual result:
Output: [newline]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-21 12:47 UTC]
Please try using this CVS snapshot:
For Windows:

 [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: Fri Mar 01 01:01:28 2024 UTC