Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-07T19:38:29-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2997 2011-04-07T19:38:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9315#p9315 <![CDATA[Re: Protected zip files are modified/broken when downloaded]]> Statistics: Posted by Jason Caldwell — April 7th, 2011, 7:38 pm


]]>
2011-04-07T14:05:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9301#p9301 <![CDATA[Re: Protected zip files are modified/broken when downloaded]]>
That indeed fixed the problem! Thanks!

Here's a detailled report of my server setup to help you pinpoint the cause of this issue (hopefully):

Cloud VPS (Linux) - 2048MB
Operating System:CentOS 5.5 x64
APC Version3.1.6
PHP Version5.2.17
WordPress 3.1.1
BuddyPress 1.2.8
S2Member Version 3.5.7

Also using an external service called CloudFlare.com for CDN and security stuff. I contacted them for know issues with zip files, but they said it should not be cause to my problem. Moving the zip files to any other folder solves the problem. Reinstalling S2Member is an option, but since it took me quite a while to get it running, I'd rather not do that :-)

If you need anything else just let me know!

Statistics: Posted by BoweFrankema — April 7th, 2011, 2:05 pm


]]>
2011-04-07T11:55:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9287#p9287 <![CDATA[Re: Protected zip files are modified/broken when downloaded]]> Hi Bowe. Great to hear from you.

Thanks for reporting this important issue.
It sounds to me like this could be a server-specific issue, possibly related to s2Member's updated handling of chunked file delivery. Perhaps it's not working with your server configuration.

For a possible quick-fix, I would try this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_filter
("ws_plugin__s2member_stream_file_downloads", "__return_false");
?>

Please see if that makes the problem go away. If it does, then please provide me with the following details so we can make an attempt to reproduce this problem on our end. 95% of the work in fixing bugs like this, is finding a way to reproduce it.

1. Operating system, Windows or Unix?
2. What exact version of PHP are you running?
3. Who is your hosting company?
4. What version of WordPress?
5. What version of s2Member?

Statistics: Posted by Jason Caldwell — April 7th, 2011, 11:55 am


]]>
2011-04-06T10:03:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9210#p9210 <![CDATA[Re: Protected zip files are modified/broken when downloaded]]>
You must be using FireFox!

Try Google Chrome and see if you still have the same problem


Sam

Statistics: Posted by drbyte — April 6th, 2011, 10:03 am


]]>
2011-04-06T05:33:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9200#p9200 <![CDATA[Re: Protected zip files are modified/broken when downloaded]]>
Is there anything I can do? This is pretty much killing my entire custom S2Member integration :|

Statistics: Posted by BoweFrankema — April 6th, 2011, 5:33 am


]]>
2011-04-05T05:54:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2997&p=9122#p9122 <![CDATA[Protected zip files are modified/broken when downloaded]]>
I've been using S2Member for almost a year now for my premium theme business, and it's been a great experience overall. Everything was running smoothly on my setup, until I upgraded WordPress and S2Member to their latest versions. Since then my protected zip files have been impossible to open for my customers.

Here's my setup:

I have one membership level with custom capabilities added to them. When a member purchases a Theme he become S2Member LVL1 with the custom capability of the theme name. He is then able to download the zip file with the theme in it. My protected downloads are setup properly:

Code:
plugin/s2member-files/ccap-mytheme/my-theme.zip


When I download this file directly from my server everything is cool. No problems. As soon as I start using the special S2Member link:

Code:
?s2member_file_download=access-s2member-ccap-mytheme/my-theme.zip


The file somehow get's modified or messed up.

As soon as you try to open the file the following error occurs on Windows:

"Error opening file: Invalid folder."

On MAC OSX it works for a few people but a new folder is created with dummy files in it (called _MacOSX)

So my first idea was that I packaged the zip files wrong. But this is not the case, since if I move the zip file outside of the s2member-files folder, and removing the .htaccess protection, the opens up fine for everyone. So the problem seems to be related to the file protection/.htaccess somehow modifying the zip when being downloaded.

For now this means I need to manually send people their themes, but I really need a solution for this. It's a pretty advanced problem, but it was working just fine in the past :-)

Greetings,
Bowe

Statistics: Posted by BoweFrankema — April 5th, 2011, 5:54 am


]]>