Results 1 to 8 of 8
Thread: gzip question
-
08-29-2007, 10:58 AM #1Junior Guru
- Join Date
- Jun 2004
- Posts
- 198
gzip question
is gzip better done thorugh php.ini or through a php script?
thanks
-
08-29-2007, 11:05 AM #2Web Hosting Master
- 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.
-
08-29-2007, 11:14 AM #3Junior Guru
- 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....
-
08-29-2007, 11:35 AM #4Web Hosting Master
- 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
-
08-29-2007, 02:27 PM #5Web Hosting Evangelist
- Join Date
- Aug 2002
- Posts
- 484
mod_deflate
-
08-29-2007, 03:47 PM #6Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
-
08-30-2007, 07:49 AM #7Junior Guru
- Join Date
- Jun 2004
- Posts
- 198
-
08-30-2007, 11:52 AM #8Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
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.