ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Error using PHP ZLib compression with proxy servers

December 04, 2008 2:59pm

Subscribe [2]
  • #1 / Dec 04, 2008 2:59pm

    When ZLib compression is turned on within PHP (zlib.output_compression = On in php.ini) users using a proxy server will receive the following error.

    The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

    Non EE pages will display fine. They only get this message from pages being served through EE.

    Does anyone have a solution to make this work?

    We would like to keep using ZLib (gzip) compression since it helps increase the page load for our users, reduces load on the routers as well as has reduced our bandwidth utilization in half.

  • #2 / Dec 04, 2008 6:26pm

    Ingmar

    29245 posts

    Michael, have you turned on EE’s gzipping as well? Might want to try turning it off. You can do so in Admin > System Preferences > Output and Debugging Preferences.

  • #3 / Dec 05, 2008 10:46am

    Thanks for the lead….


    When changing “Generate HTTP Page Headers?” to off.
    It works for the proxy users once again.

    So I guess what is hapenning is that PHP is compressing the output, but then EE is not sending out the right headers to say the output is compressed.

    I will compare the differences in headers later to see what side effect not getting EE to Generate headers might have.

  • #4 / Dec 05, 2008 11:16am

    Ingmar

    29245 posts

    If you turn on GZIP compression EE certainly sends the correct headers, too. That said, some “PHP as CGI” servers do not like it if ExpressionEngine explicitly sends its own HTTP Headers. In this case turning them off is the recommended solution.

  • #5 / Dec 06, 2008 9:03pm

    If you turn on GZIP compression EE certainly sends the correct headers, too. That said, some “PHP as CGI” servers do not like it if ExpressionEngine explicitly sends its own HTTP Headers. In this case turning them off is the recommended solution.


    Ya, but you get a warning message because you are trying to use 2 types of compression at the same time. I also have a lot of non EE pages that I want compressed as well.

  • #6 / Dec 07, 2008 4:56pm

    Lisa Wess

    20502 posts

    Michael, does this work when you keep EE’s compression off?

  • #7 / Dec 07, 2008 10:18pm

    Yes…  with compression off in EE, compression on in PHP and Generate HTTP Page Headers off in EE all is working fine.

  • #8 / Dec 07, 2008 10:22pm

    Lisa Wess

    20502 posts

    I think that is going to be your best option then since you are handling this compression on your end. I’m glad you were able to come to a working solution. =)

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases