IF Zlib is enabled globally through the php.ini then you cannot use gzip. An If/Then statement will be needed. Zlib is the preferable way to compress output, but can cause problems with other applications which rely on gzip.
It's an either/or situation.
If you use gzip then you will have to end the cylce of compression before the next header is called. This can simply be done by using this code.
<?
ob_end_clean();
ob_start("ob_gzhandler");
?>
If you do not end/clean/flush the handler you will end up with this error
PHP 4.3.x handles code a bit tighter than the previous versions which is good overall. This error occurs when the headers are being called more than once. The ob_end_clean() ends the previous compression cycle and ob_start("ob_gzhandler") starts the cycle again for the new page.
These are different than mod_gzip as that is not available across many hosts as it can be CPU intesive. Mod_gzip is only recommended to be used on dedicated servers for specific applications. The higher you set Mod_gzip then the more CPU is used.
=)
Jade
JadeDragon
Joined: 2003-02-15
Posts: 332
Posted: Tue, 2003-08-19 13:19
On another note: If this is implemented there will also need to have a way to turn it off in the admin panel.
=)
Jade
bharat
Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2003-08-23 20:55
We will definitely provide this option in the future, but not right away (got bigger fish to fry!)
Oldhoj
Joined: 2006-02-12
Posts: 17
Posted: Sat, 2006-03-25 19:19
My CPU i really overloaded with gzip (index 88) ... do anyone have any ideas ... I have around 1500 users on the gallery, but dont know how to get that load down (almost gzip all of it )
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 00:42
make sure you're using gallery 2.1 and visit Site Admin / Performance
(reply to a 2.5 year old topic, nice..)
Posts: 8194
As in output buffering? That sounds like a neat option..
If that's what you're talking about, the function is http://us3.php.net/ob_gzhandler which looks pretty neat-o ;)
Posts: 332
Yes, that is exactly what I meant.
A couple things to be aware of though.
IF Zlib is enabled globally through the php.ini then you cannot use gzip. An If/Then statement will be needed. Zlib is the preferable way to compress output, but can cause problems with other applications which rely on gzip.
It's an either/or situation.
If you use gzip then you will have to end the cylce of compression before the next header is called. This can simply be done by using this code.
If you do not end/clean/flush the handler you will end up with this error
PHP 4.3.x handles code a bit tighter than the previous versions which is good overall. This error occurs when the headers are being called more than once. The ob_end_clean() ends the previous compression cycle and ob_start("ob_gzhandler") starts the cycle again for the new page.
These are different than mod_gzip as that is not available across many hosts as it can be CPU intesive. Mod_gzip is only recommended to be used on dedicated servers for specific applications. The higher you set Mod_gzip then the more CPU is used.
=)
Jade
Posts: 332
On another note: If this is implemented there will also need to have a way to turn it off in the admin panel.
=)
Jade
Posts: 7994
We will definitely provide this option in the future, but not right away (got bigger fish to fry!)
Posts: 17
My CPU i really overloaded with gzip (index 88) ... do anyone have any ideas ... I have around 1500 users on the gallery, but dont know how to get that load down (almost gzip all of it )
Posts: 8601
make sure you're using gallery 2.1 and visit Site Admin / Performance
(reply to a 2.5 year old topic, nice..)