PHP "Content-Encoding: gzip" in ispconfig web — how?

Discussion in 'Installation/Configuration' started by make-fun, Apr 23, 2008.

  1. make-fun

    make-fun Member

    Hi folks

    I just came across a weird behavior — I don't seem to be able using the PHP
    PHP:
    ob_start("ob_gzhandler");
    for compressing the output.

    When throwing in a file like
    PHP:
    <?php
    ob_start
    ("ob_gzhandler");
    phpinfo();
    ?>
    in
    Code:
    /home/admispconfig/ispconfig/web/test.php
    it results in
    Code:
    HTTP_ACCEPT_ENCODING gzip,deflate
    But
    Code:
    Response Headers:
    
    Date: Wed, 23 Apr 2008 02:08:43 GMT
    Server: Apache
    X-Powered-By: PHP/5.2.5
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    
    200 OK
    When I put the same file in a normal user web it results in
    Code:
    HTTP_ACCEPT_ENCODING gzip,deflate
    Code:
    Response Headers:
    Date: Wed, 23 Apr 2008 02:08:25 GMT
    Server: Apache/2.0.55 (Ubuntu) PHP/5.1.2 mod_ssl/2.0.55 OpenSSL/0.9.8a
    X-Powered-By: PHP/5.1.2
    [B]Content-Encoding: gzip[/B]
    Vary: Accept-Encoding
    Keep-Alive: timeout=15, max=99
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8
    
    200 OK
    So here it does work as supposed.

    For the admin panel it does not bother me too much, but when using Roundcube webmail it would be a great improvement, of course.
    They try to use it when supported with this function:
    PHP:
    // set output buffering
    if ($_action != 'get' && $_action != 'viewsource')
    {
      
    // use gzip compression if supported
      
    if (function_exists('ob_gzhandler')
        && !
    ini_get('zlib.output_compression')
        && 
    ini_get('output_handler') != 'ob_gzhandler')
      {
        
    ob_start('ob_gzhandler');
      }
      else
        
    ob_start();
    }
    But have no luck here :(

    Any ideas/help on that?
    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ISPConfig PHP on port 81 has no gzip support compiled in.
     
  3. make-fun

    make-fun Member

    Thanks Till
    But hmmm, why do I get an
    Code:
    ACCEPT-ENCODING gzip,deflate
    from the
    PHP:
    <?php
    phpinfo
    ();
    ?> 
    :confused:

    Cheers
     
  4. falko

    falko Super Moderator ISPConfig Developer

Share This Page