php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28524 IIS loads all PHP pages very slow - solution included
Submitted: 2004-05-26 10:43 UTC Modified: 2004-08-05 23:42 UTC
Votes:9
Avg. Score:4.6 ± 0.8
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:5 (71.4%)
From: jorrit at gameparty dot net Assigned:
Status: Not a bug Package: Performance problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2004-05-26 10:43 UTC] jorrit at gameparty dot net
Description:
------------
A friend of mine had the following problem for almost 2.5 years:

He is a Windows expert, and uses IIS to host his pages. He uses PHP to make dynamical pages, and on different systems and with different PHP versions, he had the problem that pages loaded very slow. He could not find anything on the internet, only some suggestions in newsgroups that IIS does not like a lot of small pieces of data outputted after eachother, for instance echo-ing the contents of a table in a while loop.

We fixed this bij setting output_buffering to On, causing PHP to return all the output to IIS in one package. This solved the problem he had for 2.5 years immediately. I suggest that this is entered somewhere as a comment in php.ini or the manual, because it can help a lot of people.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-01 22:31 UTC] steph at taizer dot net
It certainly fixed my problems!!! IIS, PHP and MySQL were utterly unbearable, I always thought it was in my systems. Even upgrades were arranged but nothing worked...

I think this should be taken up in the installation manual for under Windows: Want to use MySQL? Well, not without this setting...
 [2004-07-21 17:13 UTC] kswillis at midsouth dot rr dot com
I was having a similar problem that was made even stranger by the fact the performance got worse the faster the network connection was--connecting at 100 mbps or 1000 mbps was much worse performance on the local network than throttling the connectiong through a 10mbps hub. I was thought that's what I was going to be stuck with, until I turned output buffering on in IIS, following the suggestion of this article, and performance has improved dramatically. There may be other things funky with the server (other than running Windows, that is) or the network, but changing output_buffering to on solved a tremendous performance problem with IIS and PHP. Thanks!
 [2004-08-05 23:42 UTC] edink@php.net
This is why it is a recommended setting in php.ini-recommended.
 [2004-09-15 06:41 UTC] allen at benusa dot com
This is definitely the fix.
For the longest time I could not figure out why my php scripts when run locally at the server run super fast, but when accessing the pages from a client, the scripts were dog slow.
Set output_buffering = On
 [2010-10-03 01:39 UTC] indian dot zenmaster at gmail dot com
That definitely fixed it for me when accessing the scripts from IE but it's still 
extremely slow when I access it using Google Chrome. Anyone figured out a fix for 
that?

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC