|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13430 Passthru doesn't honor ob_immediate_flush
Submitted: 2001-09-25 08:09 UTC Modified: 2001-12-12 04:48 UTC
From: muell at delirium dot ch Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.0.4pl1 OS: RedHat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: muell at delirium dot ch
New email:
PHP Version: OS:


 [2001-09-25 08:09 UTC] muell at delirium dot ch
Given a perl script

$| = 1;   # immediate flush
for ($i=0;$i<10;$i++) {
  print "*";

And a php script test.php:

  header("Content-Type: text/plain"); 
  ob_immediate_flush;   # here or in php.ini
  echo "calling\n";
  echo "finished\n";

Eventhough both scripts have buffering disabled, no progressive content loading happens. PHP autoflushes the first echo-line, but passthru-output is not flushed until the script has completed. 

There are situations where this behavior is no good. I have perl-scripts doing jobs on our server. These perl-scripts are called from a webpage (aka php-script). However, an inbetween firewall shuts down communication after 5 mins with no data transferred. In order to keep the connection alive, I rewrote the perl-scripts such as to send a progress character to the browser every 30 seconds. Not being autoflushed, they don't keep alive anything :-)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-12 04:48 UTC]
There is no ob_immediate_flush  function or like.
Use ob_implicit_flush()

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 04:01:29 2024 UTC