Enabling Gzip On Localhost

Hey Yii-phobians!

I am kind of stuck in this issue. I am trying to enable gzip in my application i followed the procedure in main configuration file


'onBeginRequest'=>create_function('$event', 'return ob_start("ob_gzhandler");'),

'onEndRequest'=>create_function('$event', 'return ob_end_flush();'),

First i was having a conflict with PHP Zlib Compression so i turned that off in my htaccess using


php_value zlib.output_compression off

In my WAMP apache D[color="#FF0000"]EFLATE_MODULE[/color] and [color="#FF0000"]HEADERS_MODULE[/color] is enable

but i think i am still not being able to gzip my JS & CSS

I am using [color="#FF0000"]YSLOW[/color] to check that whether its enabled or not

So is there any kind of advice how to achieve this

Are you sure you’ve hit the right forum? I don’t think you’ll find a lot of people afraid of Yii here :blink:

And in all seriousness: You should leave the compression part to either PHP or the webserver.