Helpful Information
 
 
Category: Server side development
I can't find that darn DZip trick anymore...

Anyone remember how to do it? Something to do with sticking a line into an .htaccess file and having it speed up PHP.

Thanks a bunch to anyone who can direct me somewhere with this info :thumbsup:

check out output buffering and the gzip functionality ...

http://www.php.net/manual/en/function.ob-start.php

and this article

http://www.phpbuilder.com/columns/argerich20010125.php3

Errr... The one I was after was the one where you added a line to the .htaccess file and it did the compressing that way. If this way is better, how do I do it? I copied and pasted the script into the top of my page and my site turned into a 404 :p

Thanks for any more help on this :)

I'm assuming you have mod_gzip available?

In an htaccess you can do:
php_value output_handler ob_gzhandler

or you can put this in your ini:
output_handler = ob_gzhandler ;

or you can call it direct in your code:
ob_start("ob_gzhandler");

(Of course, I've heard some nightmares about server load skyrocketing with gzhandler on)

But if you are looking for just pure speed, have you tried the Zend Optimizer or other caching alternatives?

I'm not the server admin, but I'm pretty sure it's zend optimized and all that...

ob_start("ob_gzhandler"); makes my site a 404... does that mean I don't have mod_gzip available?

Ok, the .htaccess method worked, but after I inserted it, the server began to lag... I dunno if that's coincidence, but I highly doubt it. I'll wait and see if it speeds back up again, and if it does I'll try the .htaccess thing once more to see. The page took forever to load, despite it's size of 4065 bytes (from 38560 or something!) Does that make any sense?










privacy (GDPR)