You are here: Content-Encoding is not set in response when using zlib.output_compression « PHP Programming Language « IT news, forums, messages
Content-Encoding is not set in response when using zlib.output_compression

Posted by Leif Wessman on 02/06/06 18:04

I enabled automatic gzip compression with the following lines in
..htaccess:

php_value zlib.output_compression On
php_value zlib.output_compression_level 5

The problem is that the Content-Encoding header does not get set at all
in the response. Therefore, a browser that advertises itself as
supporting gzip compression (Accept-Encoding: gzip,deflate) receives
compressed content but does not know it is compressed.

If I manually add the following to my script:

header("Content-Encoding: gzip");

.... it then works.

I'm using PHP Version 4.4.2 with the following Configure Command

'./configure' '--with-apache=../apache_1.3.34' '--with-openssl'
'--with-gd' '--with-mysql' '--enable-trans-sid' '--enable-track-vars'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib=/usr'
'--enable-mbstring' '--enable-ftp' '--enable-exif'
'--with-freetype-dir=/usr/local' '--with-pspell=/usr/local'

Zlib settings:
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2

Any ideas of what might be causing this?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация