Jump to content

[Solved] mod_gzip


Youpremium

Recommended Posts

Youpremium you can also do the same thing with php. Just add this to the very top of any php page:

 

<?php ob_start("ob_gzhandler"); ?>

 

There's also a line that you can add to your htaccess file that will gz all php files in a directory but I couldn't get it to work.

 

 

Link to comment
Share on other sites

There's also a line that you can add to your htaccess file that will gz all php files in a directory but I couldn't get it to work.
If you're using "php_flag" directives and the such, the reason it isn't working is because we have our PHP configured under suPHP rather than compiled as a DSO.
Link to comment
Share on other sites

If you're using "php_flag" directives and the such, the reason it isn't working is because we have our PHP configured under suPHP rather than compiled as a DSO.

 

This was the line for htaccess:

 

php_value output_handler ob_gzhandler

 

 

Link to comment
Share on other sites

Yeah, that isn't going to work under suPHP.

 

You should be able to get it working with some other (rather complex) .htaccess directives, though. You would need to (using mod_rewrite) pipe all requests into a single PHP file that would GZIP everything as necessary.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...