Gzip Compression issue in WordPress 1.2 Mingus
Thanks for visiting! If you're new here, you may want to subscribe to our RSS feed. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. Go ahead, subscribe to our feed! You can also receive updates from this blog via email.
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


(2 votes, average: 4.5 out of 5)











Comments RSS
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!
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…
gzip compression i think should be used by all servers. IT reduces loading time
[...] Nach einer kleinen Suchaktion bei Google war auch schon der Workaround gefunden. Dazu wird entweder: php_flag session.use_trans_sid off [...]