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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
16 + 25 = ?
Subscribe to this entry?

 
 [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: Sat May 18 18:01:32 2024 UTC