post-page

Gzip Compression issue in WordPress 1.2 Mingus

4
responses

I had noticed this error on Carthik’s Blog and have since seen/noticed it on a couple of other sites as well. Here is the issue.

When a blogging tool (such as WordPress) uses ob_start and then gzip compression to send pages to the client, at times, a (sometimes silent) warning pops up which basically means that the gzip compression is not really taking place. Here is an example of the error:

Warning: ob_start(): output handler ‘ob_gzhandler’ cannot be used after ‘URL-Rewriter’

You can check this for your own site/blog by visiting http://www.websiteoptimization.com/services/analyze/ and analyzing your site. Make sure that you have gzip compression turned on in your WordPress control panel (or somewhere on your site, if not on WordPress) and see if the analyzer complains about gzip being turned off. More than likely, you will find that though gzip is turned on, it is not being used.

In order to get around this problem (on most servers) you have to add the following line to the .htaccess file in the root of your blog/page.

php_flag session.use_trans_sid off

Or add this to your index.php (or your PHP code):

ini_set(‘session.use_trans_sid’, false);

You are basically turning off Transparent SIDs for Session variables which does not break anything on most servers and blogging tools. If something breaks, just turn it back on and wait for your PHP version to be upgraded before you can use the gzip compression feature. :)

Turning this off also has the added benefit of search engines ranking your site higher than they would with it turned on.

Find a little more information on the search engine issue here: http://martin.f2o.org/php/session

heading
heading
4
Responses

 

Comments

  1. Stacey (4 comments.) says:

    I was sent to this post by someone from the WordPress forum and I was able to add the line to my .htaccess file and things seem to be working now. Thanks!

  2. roderick (3 comments.) says:

    gzip compression i think should be used by all servers. IT reduces loading time



Trackbacks/Pingbacks

  1. WooHoo Blog says:

    One Problem Down…

    I was given some help at the WordPress forum. They sent me to this article explaining an issue with Gzip compression and WordPress. While the article is for an older version of WordPress, I added the line to my .htaccess file and suddenly my feeds c…

  2. [...] Nach einer kleinen Suchaktion bei Google war auch schon der Workaround gefunden. Dazu wird entweder: php_flag session.use_trans_sid off [...]

Obviously Powered by WordPress. © 2003-2013

page counter
css.php