Results 1 to 8 of 8

Thread: gzip question

  1. #1
    Join Date
    Jun 2004
    Posts
    198

    gzip question

    is gzip better done thorugh php.ini or through a php script?

    thanks

  2. #2
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    What are you trying to do exactly?

    I think you're getting confused, php.ini is the configuration file for PHP.
    RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca

    www.HostingSecList.com - Security Notices for the Hosting Community.

  3. #3
    Join Date
    Jun 2004
    Posts
    198
    well, you can enable gzip compression in php.ini or you can program gzip compression into a php script. I was wondering which is more efficient....

  4. #4
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    Ah, I know what you mean now.

    According to the website below, it's best to enable it under php.ini instead of at the start of each PHP script as it's no longer supported with PHP5.

    Links:
    http://www.mybelovedphp.com/2006/11/...-php-websites/
    http://ca.php.net/manual/en/ref.zlib.php

  5. #5
    Join Date
    Aug 2002
    Posts
    484
    mod_deflate

  6. #6
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    Quote Originally Posted by kerplunk View Post
    mod_deflate
    AFAIK, mod_deflate is only for Apache 2.0... and (I believe) the majority of Apache users are still using the 1.x branch.

  7. #7
    Join Date
    Jun 2004
    Posts
    198
    Quote Originally Posted by Pat H View Post
    Ah, I know what you mean now.

    According to the website below, it's best to enable it under php.ini instead of at the start of each PHP script as it's no longer supported with PHP5.

    Links:
    http://www.mybelovedphp.com/2006/11/...-php-websites/
    http://ca.php.net/manual/en/ref.zlib.php
    Thanks for the reply, but are you sure gzip isnt supported in php5? I'm using a script that only runs on php5 and gzip compression is one of its features.

    Thanks

  8. #8
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    Quote Originally Posted by strato View Post
    Thanks for the reply, but are you sure gzip isnt supported in php5? I'm using a script that only runs on php5 and gzip compression is one of its features.

    Thanks
    I apologize, what I meant was that gzip compression does work in PHP5, but according to the link above the alternative method of using gzip (adding ob_start("ob_gzhandler"); to the PHP files) did not.

    After some testing, the link appears to be wrong... so your PHP5 files should work correctly regardless of how you enable gzip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •