PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Bad Downloads in Internet Explorer

s2Member Plugin. A Membership plugin for WordPress®.

Bad Downloads in Internet Explorer

Postby mattkitchen » August 10th, 2011, 9:22 pm

A problem came to my attention today. One of the main paid member benefits of my site is the ability to download PDFs that I store in the "s2member-files" directory. Today an Internet Explorer 8 user informed me that these files are downloading as a 0kb file and will not open. I verified this today using IE8 on my work PC (I use apple products most hours of the day). I then verified that there are no issues in Chrome, Safari, and Firefox - they all download normal files as expected. I did not test IE7 or IE9 though.

Anyone else come across this or have any idea? Apparently 25% of my potential customers are using IE8 according to my stats so I would rather not inconvenience them and put down a "You must be using Firefox, Chrome or Safari to download" warning if possible. But if that's the worst case scenario I will do it.

Any ideas? - they are much appreciated! Thanks for reading.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby Cristián Lávaque » August 11th, 2011, 12:47 pm

Hi Matt.

Do they get any errors when they try to download?

Here're a couple of threads that may help with your problem. Let me know if they help:

viewtopic.php?f=4&t=799
viewtopic.php?f=4&t=6680
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 11th, 2011, 1:07 pm

Thanks for the reply, unfortunately not, I do not have any plugins that cache or affect the download and the file sizes are very small. Any other ideas?
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby Cristián Lávaque » August 11th, 2011, 1:39 pm

I'll email Jason about it.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Bad Downloads in Internet Explorer

Postby glbrent » August 12th, 2011, 4:17 pm

Yeah, internet explorer has some issues! Are you using SSL on your site at all. I had this issue to. So what I had to do was make the link address to my download file , less then 1mb, a to "http:// " link. Then the certificate on the server comes in and makes it a "https "link I believe. So that's how I internet explorer to download my files. However, it was after 40% of my audience probably had issues! Oh and I also had to turn off my https for wordpress. but I have re-enabled that.
Hope it helps!
Gabriel
User avatar
glbrent
Registered User
Registered User
 
Posts: 21
Joined: July 19, 2011

Re: Bad Downloads in Internet Explorer

Postby Cristián Lávaque » August 12th, 2011, 9:53 pm

Thanks for your help, Gabriel!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 13th, 2011, 7:39 am

Thanks for the reply Gabriel, but I'm not using SSL. The links are both using http:// and my site has no ssl certificate associated with it.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby glbrent » August 13th, 2011, 6:44 pm

Here's a couple thoughts because I spent 4 days working on this issue.
1.Look through your plugins and see if you could think of any way one of those plugins may be doing anything with logins or permissions. (I deleted every plugin that I wasn't using and tried disabling several that I thought might be causing the issue)
2. You could look at S3 from amazon for hosting the files. I thought about this but "I'm paying for storage and hosting, and SSL from bluehost.com why do I have to pay more for a stupid internet explorer download"
3. You may try is moving the files outside the s2member-protected folder. I don't know if that would work, but at least it would tell you if it's a problem inside s2member, right? My files are still inside the s2member-file folder.
4. what you are really having is a client side issue. So that's how I came up with the redirect issue discovery. I saw the "download box" right behind the error message box. And thought it's gotta be doing an extra step for protection or something.

Hope this help. I felt your pain! :ugeek:
User avatar
glbrent
Registered User
Registered User
 
Posts: 21
Joined: July 19, 2011

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 13th, 2011, 7:07 pm

I will try some of those things, i definitely need to get this figured out ASAP, just had my second paying customer complain.

S3 is an option, as I host a bunch of my videos that are progressively played back on my site there. I didn't know how secure it was compared to hosting them in the protected folder, as it is imperative to the business of the site that these PDFs are not easily downloadable.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 13th, 2011, 7:53 pm

Ok, so i tried a couple things.

in response to 1. i disabled all plugins i could, and there was no help there.

in response to 3. I also tried to move the file and it downloaded and viewed fine. The file was still in the wordpress folder structure but outside of s2-member

in response to 4. there is no error when it downloads. it goes through the paces just fine and even shows it downloading. The download dialog box just says it is done at 0kb and then gives the open option which obviously produces nothing. But there is a 0kb file on the desktop and everything.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby glbrent » August 13th, 2011, 8:07 pm

What I did while I had this error going on was to put a big warning about internet explorer and using another browser on the download page to make sure people knew! I would recommend doing the same until we figure this out.
User avatar
glbrent
Registered User
Registered User
 
Posts: 21
Joined: July 19, 2011

Re: Bad Downloads in Internet Explorer

Postby glbrent » August 13th, 2011, 8:21 pm

Since the download worked outside of the s2member structure, we need to assume that it's a s2member permissions issue. I'm sure you have page resictication. I wonder if maybe it's limiting your pdfs in someway. Make sure that under "Restriction Options > Alternative View Protection: that option is set to none" that really messed me up for a while.
User avatar
glbrent
Registered User
Registered User
 
Posts: 21
Joined: July 19, 2011

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 13th, 2011, 10:45 pm

It is set to none.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 13th, 2011, 11:05 pm

Well, moving everything to my S3 account has worked... I don't love the idea, i would rather store these small kb files on my server that i'm already paying for rather than do S3 since I wanted to leave that for the large videos i'm serving, but i'm sure it will take a long time for these 80kb files to stack up to a Gb to cost me $0.15.

I guess that beats having to post they must download firefox to download any files on my site. These first two customers were nice enough cause I got back so quickly to them, but it would be a shame to lose customers over this.

I guess S3 it is unless someone else has some other ideas....

P.S. One other good thing did come of this. I read a lot more of random fine print and found the "&s2member_skip_confirmation" code which I didn't know existed. I've been annoyed by that dialogue box since all paid members get unlimited downloads and happy I can now get rid of it now.

Thanks again glbrent.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby glbrent » August 14th, 2011, 1:03 am

I don't know about you, but I'm still a little annoyed at this problem!!!! I would like to get to the heart of it somehow. But I think this is so much more of a s2member programming/internet explorer permissions issue. It's a weird one for sure. But not surprising considering how Microsoft likes to do "their own thing".
User avatar
glbrent
Registered User
Registered User
 
Posts: 21
Joined: July 19, 2011

Re: Bad Downloads in Internet Explorer

Postby Jason Caldwell » August 17th, 2011, 6:52 pm

Thanks for the heads on this thread.
glbrent wrote:I don't know about you, but I'm still a little annoyed at this problem!!!! I would like to get to the heart of it somehow. But I think this is so much more of a s2member programming/internet explorer permissions issue. It's a weird one for sure. But not surprising considering how Microsoft likes to do "their own thing".
s2Member's default method of file delivery uses an advanced routine that delivers the file in chunks ( i.e. Transfer-Encoding: chunked ). This method avoids most issues related to high memory consumption on large file downloads. Making it possible for large file downloads to succeed. If you are getting a 0kb file download, I suspect there is a conflict between your server configuration and the way s2Member delivers the download. This is a server-side issue, and can happen when/if your Apache configuration and/or PHP configuration is overriding the headers that s2Member sends; or conflicts with output compression, as described below.

There are three ways around this issue:
1. Store your protected files inside an Amazon S3 Bucket, and configure s2Member to use your Amazon S3 account. This is the recommended method, because protected files are then stored at Amazon S3 for better security, better download speeds, and greater compatibility for VERY large files and/or media content. So, if you CAN use Amazon S3, please do, as that will be better all the way around, particularly if you plan to deliver VERY large files ( i.e. 50MB +, anything over 1GB absolutely ).

Why does s2Member need Amazon S3 to deliver VERY large files?
Well, if you're on a dedicated server where your hosting company is NOT limiting your script timeout period, you may choose not to use Amazon S3, and that's fine in most cases. However, most hosting companies impose limits on the amount of time that a script can run on your server. Since s2Member is a PHP plugin for WordPress, both powered by PHP, both WordPress and s2Member are subjected to the limits set forth by your hosting company. If you attempt to deliver a VERY large file that might take the Customer more than 30-60 seconds to download, your Customer may have trouble receiving the file, because it's being delivered through a PHP script ( i.e. subjected to a script timeout limitation ). The solution in this case, is to configure s2Member to use your Amazon S3 Bucket instead. When s2Member is configured to work with Amazon S3, there are no script timeout limits imposed at all.



2. Or, keep the files on your server, and disable s2Member's chunked file delivery in cases where your server/hosting configuration is in conflict with s2Member. You can do this by creating this directory and file: /wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter
("ws_plugin__s2member_stream_file_downloads", "__return_false");
?>


3. Resolve the conflict with your server configuration. If you're on a dedicated server, this may not be difficult for you. However, if you're on shared hosting, you might want to consider options #1 or #2 above. Make sure your Apache configuration does not attempt to override PHP headers for Transfer-Encoding, and also be sure that your PHP installation does NOT use implicit flush, ob_gzhandler, or any type of PHP-based output compression. You can use output compression, but make sure you do that with Apache, and NOT with PHP, as that causes problems for file downloads. Sometimes the problem will become more apparent in a particular version of a browser which may not cope well in all scenarios.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Bad Downloads in Internet Explorer

Postby mattkitchen » August 17th, 2011, 6:59 pm

Thanks for the detailed reply Jason, why would this happen in IE though and not firefox. The way your making it sound is that the issue lies with the way the serve is handling things, which doesn't make sense why some browsers are fine and others aren't then... Or possibly the explanation is just way over my head.
User avatar
mattkitchen
Registered User
Registered User
 
Posts: 11
Joined: August 1, 2011

Re: Bad Downloads in Internet Explorer

Postby Jason Caldwell » August 17th, 2011, 8:13 pm

Thanks for the follow-up.
mattkitchen wrote:Thanks for the detailed reply Jason, why would this happen in IE though and not firefox. The way your making it sound is that the issue lies with the way the serve is handling things, which doesn't make sense why some browsers are fine and others aren't then... Or possibly the explanation is just way over my head.
Yea, the explanation for this gets really *geeky*, but basically it has to do with the way different browsers handle ( i.e. decipher ) mixed and/or confusing messages being sent by your server and/or the combination of your server and a PHP script. For instance, if your PHP installation is attempting to GZIP output with ob_gzhandler or another form of PHP-based output compression, instead of that having been configured within Apache, it may cause odd problems in IE ( or even in other versions of browsers you've not tested yet ). There are some additional technical details discussed here in regards to ob_gzhandler ( common with GoDaddy hosting ): http://php.net/manual/en/function.ob-gzhandler.php

I'd say the most common cause of a 0kb file that I've seen, has to do with output compression. A few hosting companies ( most notably GoDaddy, in some cases ), and even some WordPress plugins attempt to use things like ob_gzhandler, and doing that has all sorts of bad side effects. The best way to deal with output compression, is with Apache. See: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

For those who are tech savvy, you can try disabling all forms of PHP-based output compression, and use something like this inside your .htaccess file instead:
Code: Select all
# COMPRESSION FOR SPEED
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/plain
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
AddOutputFilterByType DEFLATE font/truetype application/x-font-ttf font/opentype application/x-font-otf
</IfModule>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron