php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20037 flush not working after setting session id
Submitted: 2002-10-23 05:40 UTC Modified: 2002-10-23 18:36 UTC
From: bob at hostelworld dot com Assigned:
Status: Wont fix Package: Output Control
PHP Version: 4.2.2 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-10-23 05:40 UTC] bob at hostelworld dot com
Seems that after setting the session id, a flush isnt working.
If you supply a PHPSESSID, then it doesnt output anything until the end of the script, without the PHPSESSID, then it does what you would expect, output one stamp, then another after 10 seconds.

<?
  if ( $_GET["PHPSESSID"] ) {
    $PHPSESSID = $_GET["PHPSESSID"];  
    session_id($PHPSESSID);  
  }
  session_start();
  for($i=0; $i<300; $i++ ) {
    echo "\n";
  }
  
  echo gmdate("H:i:s");
  echo "<BR>";
  flush();  
  sleep(10);
  echo gmdate("H:i:s");
  echo "<BR>";
?>

'./configure' 
'--with-apxs=/usr/local/apache-1.3.26/bin/apxs' 
'--with-mysql' 
'--with-mhash' 
'--enable-track-vars=yes' 
'--enable-debug=no' 
'--enable-force-cgi-redirect=yes' 
'--enable-calendar' 
'--with-gd=/export/home/hostel/Installs/gd-1.8.4' 
'--with-png-dir=/export/home/hostel/Installs/libpng-1.0.12' 
'--with-zlib' 
'--with-jpeg-dir=/export/home/hostel/Installs/jpeg-6b' 
'--enable-mbstring' 
'--enable-mbstr-enc-trans' 
'--enable-trans-sid'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-23 18:36 UTC] yohgaki@php.net
You have mistake in your script, but it does not matter.

Flushing will not work when buffer (trans sid, zlib.compression, ob_gzhandler, mb_output_handler, etc) is used.

And it will not be fixed, even if I would like to ;)

Don't try to flush.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 10 21:01:27 2024 UTC