php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29853 Output buffering = Off is slow
Submitted: 2004-08-26 17:50 UTC Modified: 2005-02-23 19:39 UTC
Votes:7
Avg. Score:3.7 ± 1.4
Reproduced:6 of 6 (100.0%)
Same Version:3 (50.0%)
Same OS:4 (66.7%)
From: webmaster at neteject dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 5.0.0 OS: Windows 2003
Private report: No CVE-ID: None
 [2004-08-26 17:50 UTC] webmaster at neteject dot com
Description:
------------
PHP 5.0.1 ISAPI Windows 2003 Enterprise Server.

I have tested this on different machines with W2003 Server Enterprise installed.

I have webppages with a lot of phpchunks with sql and different calculations.

When have outbuffering to off the page is printed very slow and halts in almost every chunk. Setting the output to On prints the page fast.

I have tested this on my local network. I have connected to 1 xp machine and 2 w2003 machines. XP did not have any problems with output buffering off.

One interesting thing is that the page runs quite fast on the local computer which makes me wonder if it has any conjunction with how IIS 6 works. Anyway, the fact still remains that running with output buffering on produces a fast page from anywhere.

Reproduce code:
---------------
<?

Try any mysql_query here.

?>
<HTML>
<BODY>
<?

Try any mysql_query here.

?>
<TABLE>
<?

Try any mysql_query here.

?>

etc...

Expected result:
----------------
Page loading in chunks


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-02 19:30 UTC] php at sharpdreams dot com
I also experienced this, and yes it is an IIS issue. AFAIK, output buffering is the only solution. You can do your own output buffering in the page if certain blocks need to be pushed to the client (ie, in long calculations).
 [2004-10-13 18:28 UTC] matt at cloverbasin dot com
Windows 2003 Standard, IIS6.0, PHP 4.3.2, PHP4ISAPI.dll

PHP page rendering is excrutiatingly slow, static HTML pages still render quickly.  CGI/PHP.exe does not seem to exhibit this behavior.

The "Output Buffering = On" workaround seemed to be succesful.
 [2005-01-14 18:12 UTC] m2pc at hotmail dot com
I migrated a large-scale PHP application from Win2K Advanced Server to Windows 2003 Standard Edition and noticed huge delays and page timeouts.  I tried switching PHP to CGI instead of ISAPI module and got HTTP header errors.

Then I tried setting "Output Buffering = On" in my php.ini file, switched back to ISAPI mode, restarted IIS and now it runs lightning fast!

It seems to be an issue with IIS6 on the new Windows Server OS, as the same exact application runs fine on earlier versions of IIS with output buffering off.
 [2005-02-02 15:50 UTC] tpiper at pinnacle dot co dot uk
We're also getting it with PHP 4.3.10 running on IIS6 on W2K3 Server. Output Buffing on in php.ini fixes it for us too.
 [2005-02-18 10:38 UTC] markus dot gawlowicz at 104 dot 6rtl dot com
did have experienced exatcly the same problems. once the application was transfered to IIS6 on W2K3 the page runs extremely slow.

have switched the outputt buffering on now("output_bufering=16192" in php.ini)

the page runs now fast as hell :)

100% success
 [2005-02-23 19:39 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

With significant amount of output lack of buffering will result in many write syscalls which are slow.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC