Bug #18035: session_destroy causes loss of output

From: Date: Fri, 28 Jun 2002 05:30:25 +0000
Subject: Bug #18035: session_destroy causes loss of output
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12307@lists.php.net to get a copy of this message
From: warwick@imvs.sa.gov.au Operating system: RedHat 7.2 PHP version: 4.2.0 PHP Bug Type: Output Control Bug description: session_destroy causes loss of output This problem occurs with PHP 4.2.0 and PHP 4.2.1 but is fine using PHP 4.1.1 and older versions. When calling a session_destroy() on a newly created session, it will clear buffered output when greater than 4k without sending it to the client. The following sample script should demonstrate this. When $repeatCount is 4096 or greater, only the word END will be output, without the 4096 X's preceeding it. When repeatCount is 4095 the X's and the word END are sent. By removing the session_destroy() call following the str_repeat echo the X's will be output regardless of the $repeatCount setting. <?php ## Sample script ## ## Relevant (?) php.ini settings I have: ## output_buffering = Off (have tried 8192 - no effect) ## output_handler = ## zlib.output_compression = Off ## implicit_flush = Off ## $repeatCount = 4095; ## Works fine $repeatCount = 4096; ## Fails session_start(); echo str_repeat('X', $repeatCount); session_destroy(); echo "END"; ?> -- Edit bug report at http://bugs.php.net/?id=18035&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18035&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18035&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18035&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18035&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18035&r=support Expected behavior: http://bugs.php.net/fix.php?id=18035&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18035&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18035&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18035&r=globals

« previous php.bugs (#12307) next »