php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14695 session_destroy affects output (tans sid related)
Submitted: 2001-12-25 21:44 UTC Modified: 2002-03-06 01:36 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ccjeagle at ms6 dot hinet dot net Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.0 OS: FreeBSD4
Private report: No CVE-ID: None
 [2001-12-25 21:44 UTC] ccjeagle at ms6 dot hinet dot net
Take a look at this:

<?php
session_start() ;
$_SESSION["username"] = "abc" ;
echo "<p>First Line Here</p>" ;
session_destroy() ;
echo "<p>Second Line Here</p>" ;
?>

The output source code becomes :
<p>First Line Here</<p>Second Line Here</p>p>
------------------^^^----------------------^^

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-25 22:17 UTC] yohgaki@php.net
Are you using and enable trans-sid?
 [2001-12-25 23:10 UTC] ccjeagle at ms6 dot hinet dot net
yes sure.

All ohter functions work fine for me till now.

Moving the session_destroy() to the end of all scripts seems to be a work around.
 [2001-12-25 23:11 UTC] ccjeagle at ms6 dot hinet dot net
sorry, "walk around".
 [2001-12-26 00:15 UTC] yohgaki@php.net
Sorry for inconplete question.
I would like to know if you don't use --enable-trans-sid in your configure line, does this problem stop or not.
 [2001-12-26 01:04 UTC] ccjeagle at ms6 dot hinet dot net
If the session.use_trans_sid set to 0, there is no error occure. Should I rewrite all my scripts to fit this ?
 [2001-12-26 01:07 UTC] ccjeagle at ms6 dot hinet dot net
( I havn't tried to re-compile without --enable-trans-sid)
 [2001-12-26 01:40 UTC] yohgaki@php.net
Ok. Thanks. I think I know what is causing the problem now :)
I changed status to analiyzed, but I'm not 100% sure.
I'll update this report when I verified the cause.
 [2002-01-18 21:38 UTC] fabian at ahrberg dot se
My page gets cut off in the middle after the destroy call. Very weird! I've tried doussins of browsers and they all show the same - after session_destroy() the page gets cut off after a while. I run apache on a linux machine...
 [2002-01-18 22:22 UTC] yohgaki@php.net
I haven't checked code yet, but I'm guessing "trans-sid" buffer is destroyed.
If you disable trans-sid, you will not have problem. 
If you do, please let us know.
 [2002-01-18 22:24 UTC] yohgaki@php.net
Could you try it with 4.2.0-dev? since output buffering code differs.

 [2002-03-06 01:36 UTC] yohgaki@php.net
This bug has been fixed in CVS.

Session destory affects output when you are using trans-sid.

This will not be fixed, but instead, you can get array of output buffers with
ob_get_status() function can be found in CVS.

Closed to users notice trans-sid affects output.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 07 16:01:28 2024 UTC