[Mod_gzip] SEND_AS_IS:HAS_CE message

mod_gzip@lists.over.net mod_gzip@lists.over.net
Fri, 2 May 2003 03:10:46 EDT


Hi Jack...

>You wrote...
>
>Hi Kevin,
>
>Thanks for your kind and immediate reply.  I  have understood the term
>"Contern-encoding". Thanks.
>
>According to your direction,  I have check php.ini file, but I still cannot
>find any setup directives / parameter which have any relation with
>"Contern-encoding" in php.ini file.
>
>Could you mind showing me how to find this problem ?  

Sorry. I don't use PHP and I really don't know much about it.

But this seems a little strange to me...

> Major directives /
>parameters in php.ini are as follows,
>
>output_buffering = 4096
>output_handler = ob_gzhandler
>zlib.output_compression = Off

Does 'zlib.output_compression = Off' apply to
'output_handler = ob_gzhandler' or are they 2 
completely different things? 

GZIP is not ZLIB. Is 'ob_gzhandler' doing GZIP on
things even if your ZLIB option is off?

Perhaps you need to also comment out the 'ob_gzhandler'
line to remove that 'output filter'? Just a guess.

Your posting would seem to indicate that PHP does, in fact, have
the ABILITY to compress it's own responses but in
your case it is turned OFF.

If that's the case... then you should NOT be getting
a 'Content-encoding: gzip' response header out of the
PHP engine at all.

That leaves only a few possibilities here...

1. PHP is still adding SOME kind of "Content-encoding:"
field even though it's not actually compressing. This sounds
like it would be a very bad bug in PHP.

2. PHP is actually compressing the responses even though
you seem to be telling it not to. This would also be a very
bad bug in PHP.

3. The "Content-encoding:" field is being added by something
else ( other than mod_gzip ). I would have no idea what that
'something else' might be.

The only way to know for sure what your PHP CGI back-end
is really sending is to capture the PHP script output itself,
headers included.

Can you just run the PHP script outside of Apache and
see what it is sending? If it's totally dependent on
having environment variables set ( Like whether or not
requetor has sent 'Accept-Encoding: gzip' ) then you
would have to set those environment variables manually
before you call the script in order to get a 'true' output
from the script.

You could also just capture the whole 'response' coming
out of Apache. If the response has "Content-encoding: ???"
response field but mod_gzip still says "SEND_AS_IS:HAS_CE"
then I assure you that your PHP is the thing that is 
adding that header regardless of what your setup choices are.

Later...
Kevin