enable zlib.output_compression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kcomer
    Junior Member
    • Jun 2006
    • 3

    #1

    enable zlib.output_compression

    I can't enable output compression in my .htaccess file. Has anyone else been able to do this succesfully?

    Here's what I'm addign to the .htaccess file
    Code:
    php_flag zlib.output_compression On
    php_value zlib.output_compression_level 5
    I tried to set these at the top of my script using ini_set, and they get set correctly when viewing phpinfo() to test, but compression isn't enabled. When I set them in the .htaccess file I get 500 Internal Server Error from apache.

    I'm stumped on this one. Hopefully someone can help.

    Keith
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    We run phpsuexec so PHP settings cannot be added to .htaccess files. You will need to create your own php.ini in the directory of the script that requires the setting.

    Comment

    • kcomer
      Junior Member
      • Jun 2006
      • 3

      #3
      I added the php.ini file. It works, sort of. I am using php5 for the site so I have a special handler setup in cpanel for one file extension type to be handled by php5. If I access a normal php page in the directory where the php.ini file is, it sees it and uses it. If I access the file thats being processed by php5 it doesn't pickup the ini file I created. Any ideas?

      Thanks for the quick reply.

      Keith

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3655

        #4
        You likely will not be able to have such a setup work with PHP5 since PHP5 is running seperately as CGI, not with phpsuexec.

        Comment

        • kcomer
          Junior Member
          • Jun 2006
          • 3

          #5
          Ok, I'm having odd issues with XMLHttpRequest stuff and the headers getting garbled when I use compression and was trying it different ways to see where the problem was. I will probably drop back to php4 for now. Any ideas when php5 will be running as an apache module and php4 will be cgi?

          Keith

          Comment

          • AndrewT
            Administrator
            • Mar 2004
            • 3655

            #6
            We will never be running PHP as an apache module. Nor do we have plans to make PHP5 the default with phpsuexec at this time.

            Comment

            Working...