Page 1 of 1
S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 2:22 pm
by Judith
When the new update using PHP 5.2.3 came out of S2-Member, I tried to use it but my PHP is only 5.2.2 so it threw out a fatal error. Thank goodness I had the old S2-Member files. I completely deleted the new update and then uploaded (FTP'd) all the old S2-Files into the plugin part of word press.
My S2member-files folder was not touched.
Well now all the zip files in my S2member-files Folder (yes, the folder which protects my files) is causing my zip files to show as corrupted when downloaded.
If I FTP the zip files from the S2member-files Folder down to my hard drive and extract, they are perfect.
When I click on a link on my website (both in my member area and my individual protected product) to download the files, all the zip files are corrupt (meaning they won't even extract).
This makes no sense to me. I can put the zip files in an unprotected folder and they will download and extract just fine.
So what is causing the corruption?
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 4:41 pm
by Cristián Lávaque
Hi Judith.
Maybe you left a file that doesn't belong to the s2Member version you're using?
Try deleting the s2member plugin folder (
/wp-content/plugins/s2member/) and re-uploading it via FTP (don't forget to enable deactivation safeguards first, though
WP Admin -> s2Member -> Genearl Options -> Deactivation Safeguards).
That said, why don't you ask your webhost to update their PHP version?
I hope that helps.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 5:40 pm
by Judith
Couldn't have left a file in the folder because I deleted the entire contents before I uploaded the old S2-member and I did ask my host at jumpline.com but they told me the company who owns sphera will not let them update.
I then talked with Bluehost and they are only at 5.2.17 and won't upgrade their servers until 5.2.3 is known to be completely stable.
So I'm left out in the cold for updating.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 7:01 pm
by Cristián Lávaque
5.2.17 is newer than 5.2.3, it's good for the latest s2Member.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 7:19 pm
by Judith
Well Duh, I feel a little stupid but I really don't want to switch my sites over to Blue Host as I have VDS and BlueHost is shared hosting.
But that still doesn't help me solve my original problem.
I deleted all of S2-Member in my back-end. Unzipped the S2-Member again and then uploaded the S2-Member folder again. I still have the problem of the corrupt zip files in the S2member-files folder when downloading.
Is there anything in the database files that could have put something different?
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 11:13 pm
by drbyte
What browser are you using?
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 12th, 2011, 11:40 pm
by Judith
I've used both Firefox 4 and IE 7 for testing the downloading but my two customers who told me about the problem this morning, I haven't a clue what they used.
This has something to do with the special folder (s2member-files) for all the files needing to be protected corrupting the zip files.
When I FTP the files down to my hard drive, they extract fine and all videos work. Also when I put the zip files in a unprotected folder in the same directory as s2member-files, they download and extract just fine as well.
When I or my customers click on the link either on my protected page or in my member area, the zip files after downloading won't open and a dialogue box comes up saying they are corrupted.
Now S2 member has to be adding something that's making them corrupt. Do you know what that might be?
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 12:05 am
by drbyte
there is nothing wrong with the S2M...Not sure what you mean by VDS but i'm sure you meant to say VPS!
Windows or Unix server?
Check your server configuration/permission
Check s2Member File Download Options
Sam
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 2:05 am
by Jason Caldwell
Here are a couple of other things you might check on.1. Not all file zipping applications are equal. Some zip applications compress files in special ways that might work fine on your system, but are not largely compatible with other applications. I recommend Windows Zip ( built into Windows context menus ),
7-Zip ( my personal favorite ), or
WinZip.
2. On some servers, s2Member's default method of file delivery fails for some unknown reason. We've been unable to identify the source of the issue
( but it seems to be server-specific ), and affects only a small percentage of site owners. Thus, it's been difficult to nail down.
If all else fails, please follow these instructions.
Create this file and directory:/wp-content/mu-plugins/s2-hacks.php
- Code: Select all
<?php
add_filter("ws_plugin__s2member_stream_file_downloads", "__return_false");
?>
* No extra spaces or line breaks, before or after <?php ?>.After adding this file, if the problem goes away, please help us out by reporting back. If possible, I'd like to investigate the issue as it exists on your server in hopes of finally tracking down this elusive server-specific issue. We believe it has something to do with output compression implemented by some hosting companies running Fast-CGI. However, we have not yet been able to pin it down. Again, this seems to affect about 1% of all s2Member installations, so it's very difficult to fix. If you can assist us in this regard, we would be very grateful.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 10:17 am
by Judith
I do use WinZip. And after Googling what might be the cause, I'm sure you're absolutely correct. Was going to call my hosting company today and ask if they did something different to my server. And I do have VDS not VPS through my hosting service.
What baffles me when I first installed and set up S2 Member, it all worked perfectly until I tried to update S2 member and couldn't because of my version of PHP. Now I know it to be just a coincidence.
Also many prior customers had no problem downloading my one "protected" product. Only in the last two days has the problem reared its ugly head.
I will try your workaround (hack) and see if that has any effect on resolving this issue. Thanks, I'll let you know.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 11:32 am
by Judith
Called jumpline.com and have a support ticket in about the corrupt zip problem. Gave them member access so they could replicate the problem.
I asked them if they made any server changes and he said not since the first of the year.
I am having something strange happen when I download with IE 7 but not Firefox 4 or Chrome. After the download completes, another dialog box pops up with some weird alphabet (i.e., mytzt...dr) can't get it all because it's too fast. Never had that happen before. Don't know if it's related.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 11:33 am
by Judith
Forgot to add, I tried your hack and it didn't work and the reason for calling my hosting service.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 11:49 am
by Judith
Just got this response from jumpline:
There is something in the script that you are calling that is corrupting the downloads. I downloaded the "AudioBookPackage.zip" via the login you provided and you are correct it was corrupt, I then downloaded the audiobookpackage directly from the server using SCP, from the directory ........../wp-content/plugins/s2member-files/AudioBookPackage.zip , And this was not corrupted. If this is not the same file your script is using to serve. Let us know so we can test further.
Well it's the same file and as I told you before, this is exactly what is happening to me. I changed the first part after directory to the dots for security reasons.
So what do we do next?
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 2:02 pm
by Judith
After doing some research in Google, I came across this:
http://www.sigsiu.net/forum/download-plugin/zip-file-corrupted-after-download-%28solved%29/I realize this is about Joomla but since Wordpress is also a CMS, I thought it might apply since I found this in your file-
download-access.inc.php:
Send the file to the browser in chunks ( in support of larger files ).
Be sure to turn off output compression, as it DOES get in the way.
*/
set_time_limit (0); /* Unlimited. */
ini_set ("zlib.output_compression", 0); /**/
header ("Accept-Ranges: none");
header ("Content-Encoding: none");
header ("Content-Type: " . $mimetype);
header ("Content-Length: " . $length);
/**/
if (!$inline) /* If not inline, we default to serving the file as an attachment. */
header ('Content-Disposition: attachment; filename="' . $basename . '"');
/**/
The reason I think something might be going on is my larger zip files are corrupted but when I
download some of the smaller files, they are not and they all are in the s2member-files folder.
Then again, what I know about writing and reading PHP you could put on the head of a pin
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 4:15 pm
by Jason Caldwell
So it sounds like the issue on your installation, is associated with script timeout and memory restraints
( depending on your hosting provider ). In other words, s2Member's ability to read and deliver VERY large files is being limited by your server, and thus it results in corrupted files when the script takes too long to process things.
s2Member's ability to stream files in "chunks" ( i.e. Transfer-Encoding: chunked ) is capable of working around that limitation on most hosts though. If this continues to cause trouble for you, please let me know. If you can provide me with FTP access via
this form, I'll be happy to investigate the issue and see if there is a workaround possible.
You might also want to try this:Inside /wp-config.php, add this line:
- Code: Select all
define("WP_MEMORY_LIMIT", "512M");
See:
http://codex.wordpress.org/Editing_wp-c ... ted_to_PHP
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 6:33 pm
by Jason Caldwell
I just received your FTP details.Looks like timeouts/memory is NOT the issue on your installation.
Before I go any further though, can you please upgrade to s2Member v3.5.8? You are currently running s2Member v3.3.2, and we've made some improvements since then. Please report back after upgrading and let me know if the problem continues. If it does, I'll take another look for you.
See:
viewtopic.php?f=36&t=247
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 13th, 2011, 6:46 pm
by Judith
Can't use (s2Member version 3.5.8) because it requires Compatibility. s2Member now requires PHP v5.2.3+
My hosting on has PHP v 5.2.2 and when I asked if they would update it, they said no. I've been with them 13 years and this really ticked me off.
But to move my site is not something I want to do right now.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 17th, 2011, 11:28 pm
by Jason Caldwell
This should be working for you now.I merged the relevant changes into your existing installation for you.
~ Everything looks good now from my end.
For the benefit of other readers. The solution to this problem, was to upgrade to s2Member v3.5.8+.
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 17th, 2011, 11:38 pm
by Judith
Thank you soooooooooooo much.
But I also decided with the advent of the new Wordpress requiring at least 5.2.4, I would get a new hosting company. Decided on BluHost.com because they are up to 5.2.17.
Your doing what you did means, I have some time to move it. I will definitely upgrade to the new S2-Member version when I do.
Really appreciate the extra effort you went to.
Judith
Re: S2-Member Files Folder + Corrupt Files
Posted:
May 17th, 2011, 11:40 pm
by Judith
Forgot to add, I went with BlueHost Pro Version so it's similar to the VDS I'm on now.