Investigation completed.GZIP compression MUST be disabled during s2Member's attempt to deliver a file via PHP. This is because files that s2Member delivers via PHP, are already compressed. Thus, re-compressing files delivered by a script will corrupt them in your browser. Some media playback devices will choke on this as well.
s2Member makes every attempt to programmatically disable
GZIP during it's delivery of a file. However, I've just identified a case on your server where s2Member was failing to do so. Thus, you are having an issue with media playback of protected files.
This issue, as it existed on your server, was related to your use of
mod_deflate to facilitate
GZIP compression for files served from your site. Unfortunately, when s2Member is running on a CGI-based installation of PHP, it has only one ability to disable
GZIP compression dynamically, at the Apache level. The only way for s2Member to accomplish this, is to send this header...
Content-Encoding: none. However, this header goes against standards, and was thus removed in more recent versions of s2Member. It's just not a good idea to send an invalid header, it's better to solve the underlying issue.
For instance, this invalid header...
Content-Encoding: none, was recently discovered to cause an issue with the
WP_Http class. s2Member now empties this header, instead of setting it to (none), which is the correct standards-compliant method of saying "no
GZIP here".
However, CGI-based installations of PHP do not follow this rule so well. When
mod_deflate is being used in your server configuration (which is a good idea, nothing wrong with this), it will attempt to
GZIP all PHP script output, regardless of content-type in many cases. This is a limitation on CGI-based installations. On installations of PHP running as an Apache module, s2Member has no trouble, because it can call upon
apache_setenv("no-gzip"). It's more difficult on a CGI or FastCGI extension though.
Long story shorter here...If you're running s2Member with
mod_deflate for Apache (common on many hosts), including BlueHost... you'll want to add this section to the top of your WordPress
.htaccess file, so that your installation of Apache will know when it should NOT use
GZIP compression.
This has been added to your site. Please let us know if you have any further trouble.- Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} (?:(?:^|\?|&)s2member_file_download\=.+|(?:^|/)s2member-files/.+)
RewriteRule ^(.*)$ - [E=no-gzip]
</IfModule>
* A future version of s2Member will make this recommendation during your configuration of File Downloads for s2Member. It's never a bad idea to place this in your .htaccess file, regardless of server configuration. It never hurts. We'll probably configure s2Member's UI panel with a button that will pop this in for you automatically, just to keep things simpler.