You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hristo Nazarov <hr...@galaxite.net> on 2002/07/23 14:40:34 UTC

mod_gzip and PHP

Hi,
mod_gzip works (compresses)  *.php, but *.php?var=test is not compressed.
Any Ideas?
I have: 
Apache/1.3.26 (Unix) PHP/4.2.1 mod_gzip/1.3.19.1a mod_perl/1.27 configured


mod_gzip_on                 Yes
mod_gzip_can_negotiate      Yes
mod_gzip_dechunk            Yes
mod_gzip_minimum_file_size  600
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 100000
mod_gzip_keep_workfiles     No
mod_gzip_temp_dir           /usr/local/apache/gzip
mod_gzip_item_include       file \.html$
mod_gzip_item_include       file \.txt$
mod_gzip_item_include       file \.jsp$
mod_gzip_item_include       file \.php$
mod_gzip_item_include       file \.pl$
mod_gzip_item_include       mime ^text/.*
mod_gzip_item_include       mime ^application/x-httpd-php
mod_gzip_item_include       mime ^httpd/unix-directory$
mod_gzip_item_include       handler ^perl-script$
mod_gzip_item_include       handler ^server-status$
mod_gzip_item_include       handler ^server-info$
mod_gzip_item_exclude       file \.css$
mod_gzip_item_exclude       file \.js$
mod_gzip_item_exclude       mime ^image/.*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod_gzip and PHP

Posted by Robert Andersson <ro...@profundis.nu>.
> mod_gzip_item_include       file \.php$

The $ sign indicates end of line, so it will match "x.php" but not
"x.php?x". Try changling that line to:

mod_gzip_item_include       file \.php.*$

(unescaped dot means any char, and asterisk means 0 or more of them)

I have never used this module, so I don't know if it works, but try it.

Regards,
Robert Andersson

----- Original Message -----
From: "Hristo Nazarov" <hr...@galaxite.net>
To: <us...@httpd.apache.org>
Sent: Tuesday, July 23, 2002 2:40 PM
Subject: mod_gzip and PHP


> Hi,
> mod_gzip works (compresses)  *.php, but *.php?var=test is not compressed.
> Any Ideas?
> I have:
> Apache/1.3.26 (Unix) PHP/4.2.1 mod_gzip/1.3.19.1a mod_perl/1.27 configured
>
>
> mod_gzip_on                 Yes
> mod_gzip_can_negotiate      Yes
> mod_gzip_dechunk            Yes
> mod_gzip_minimum_file_size  600
> mod_gzip_maximum_file_size  0
> mod_gzip_maximum_inmem_size 100000
> mod_gzip_keep_workfiles     No
> mod_gzip_temp_dir           /usr/local/apache/gzip
> mod_gzip_item_include       file \.html$
> mod_gzip_item_include       file \.txt$
> mod_gzip_item_include       file \.jsp$
> mod_gzip_item_include       file \.php$
> mod_gzip_item_include       file \.pl$
> mod_gzip_item_include       mime ^text/.*
> mod_gzip_item_include       mime ^application/x-httpd-php
> mod_gzip_item_include       mime ^httpd/unix-directory$
> mod_gzip_item_include       handler ^perl-script$
> mod_gzip_item_include       handler ^server-status$
> mod_gzip_item_include       handler ^server-info$
> mod_gzip_item_exclude       file \.css$
> mod_gzip_item_exclude       file \.js$
> mod_gzip_item_exclude       mime ^image/.*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org