logo
Published on Technical articles on: Windows servers, Apache Web Server, MySQL, PHP, IIS (http://www.sitebuddy.com)

Compression of PHP output & output_buffering

By chris
Created 12 Jan 2006 - 9:38pm

To perform compress at the server level under Apache see: How to enable Apache compression with mod_deflate

output_buffering = Off
output_handler =
zlib.output_compression = On

XOR (try this one)

output_buffering = On
output_handler = ob_gzhandler
zlib.output_compression = Off
output_buffering
You can enable output buffering for all PHP files by setting this directive to 'On'. If you wish to limit the size of the buffer to a certain amount, you can use a maximum number of bytes instead of 'On' (i.e. output_buffering=4096). As of PHP 4.3.5, this directive is always Off in PHP-CLI.

One person posted:
"With IIS: If you experience high parse times, try to set output_buffering to On. IIS has had problems with scripts outputting many small pieces of text, and with output_buffering = On, PHP sends the whole page to IIS in one piece."

Ref:
http://www.webperformance.org/compression/php-compress.html

Source URL:
http://www.sitebuddy.com/PHP/My.ini/Output_Buffering