Page 2 of 3

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 2:14 pm
by sandlily
OMG please help (my client is losing patience).

No, there is no .htaccess inside the s2member-files folder - only my zip files.

I created that php file (and created a folder called mu-plugins, which I put inside wp-content), but that made things worse! Now when I click on anything other that my homepage or membership options page I just get:

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web282/b2824/ipw.stephengilligan/public_html/downloads/wp-content/mu-plugins/s2-hacks.php:8) in /hermes/bosweb/web282/b2824/ipw.stephengilligan/public_html/downloads/wp-includes/pluggable.php on line 897

Aarghh... if i upgrade to s2member pro, would it resolve this?

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 2:23 pm
by sandlily
or do i need to just give up on protecting the files and just have direct links (to the files outside s2member) on the protected pages (and hope people don't share with all their friends)...

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 2:57 pm
by sandlily
Actually, would it be possible to hire one of you to configure this site properly for me? PLEEEAAASE? We don't need the membership part at all, just 'buy now' buttons that deliver a download link (or page with several links).

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 9:47 pm
by Cristián Lávaque
Lily, regarding that error you got, you must have left something outside the PHP tags. There musn't be anything outside the PHP tags in that file before the <?php or after the ?>.

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 10:25 pm
by drbyte
OK, here's what I would do to

Create a whole new directory under your http root directory call it test

load in a fresh new version of WP
install ONLY S2M

Do not install anything or load in any other theme

Copy one of the big files you have on from the original site and try to download it.

Now, if you get the same error 500, then you have a limited host account.
Solution: Change host company

If you are not getting any errors, then it must be something with you r current installation.
What can you do:

Backup your live site (database, and folders, files).
to do that, create a folder under your public http and call it BACKUP/
make sure you copy, not cut

after you done with the back up, go to S2m and make sure that Safe guard site information is ON
If you have any log files you would like to save, make sure you save them

uninstall S2m and and load in a fresh new downloaded version of s2m. override all s2m files

When done, copy back your mp3 files under the s2m folder and make sure .htaccess is there too

Clear your browser cache any try your links.

IF you still getting errors, then it's not s2m. It might be something with WP installation. The only thing I can think of is the .htaccess file. if you have the permalink structure customized then it should look like this

Code: Select all
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


I don't think you are using the permalink structure because you still using page IDs. Then your .htaccess should be empty or does not exist unless you are using some other plugin that utilize the .htaccess file


If it all fails, then you might need to reconstruct the whole site again by installing everything from scratch.


BUT, if your host company is giving you hard time in providing you with small requests like the log files then i would move on to better one.

I usually don't like this structure
/hermes/bosweb/web282/b2824/ipw.stephengilligan/public_html/

Sam

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 11:19 pm
by sandlily
Thank you so much - now we're onto something!! I fixed the php file and now after i click to confirm download, it does supposedly download the file... only problem is, it only takes a second (which can't be right) and then when i open the (zip) file with archive utility i just get a new zip.cpgz file (??), and neither of these will open with itunes. Are my files no good ("corrupted")? I moved them to my s2member-files folder from where they download and play correctly (when linked to directly). Does this make any sense to you?

Re: Internal Server Error when attempting a download

PostPosted: June 27th, 2011, 11:23 pm
by sandlily
Oops, i wrote that last response to Cristián's post before seeing yours (Sam). After reading my new post do you see an easier fix than the new installation? Thank you all so very much for your efforts to help me!!!

Re: Internal Server Error when attempting a download

PostPosted: June 28th, 2011, 1:28 am
by drbyte
HI


Just a browser test:

Are you using Firefox? If yes, try using Google chrome and see if the download file is OK

I think there is a hack for this...Try searching Jason posts

Sam

Re: Internal Server Error when attempting a download

PostPosted: June 28th, 2011, 1:02 pm
by sandlily
Yes, that file problem was in Firefox and Safari.

And, sadly, in Google Chrome, after clicking to 'confirm download' i get no downloading action, just:

This webpage is not available
The webpage at http://www.stephengilligan.com/download ... 2010_2.zip might be temporarily down or it may have moved permanently to a new web address.
Error 346 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH): Unknown error.

darn. i was so encouraged yesterday when i was actually getting something to download...

Re: Internal Server Error when attempting a download

PostPosted: June 28th, 2011, 1:11 pm
by sandlily
Oh, look what my host server FINALLY decided to tell me -- after having this support ticket going for 11 DAYS!!!

"I have checked both the files TC2010_1.zip and TC2010_2.zip and noticed that the size of both the files is above 1GB. Unfortunately, it is not possible to download large files using scripts. It will time out after 60 seconds. You need to use FTP to download large files."

Re: Internal Server Error when attempting a download

PostPosted: June 28th, 2011, 3:08 pm
by Cristián Lávaque
Oh, aren't they helpful? See? You should have asked them sooner. :)

Well, the mystery is now resolved then. You could split the files into parts, or use another hosting service for them (e.g. Amazon S3).

Re: Internal Server Error when attempting a download

PostPosted: June 29th, 2011, 12:21 am
by Jason Caldwell
sandlily wrote:Oh, look what my host server FINALLY decided to tell me -- after having this support ticket going for 11 DAYS!!!

"I have checked both the files TC2010_1.zip and TC2010_2.zip and noticed that the size of both the files is above 1GB. Unfortunately, it is not possible to download large files using scripts. It will time out after 60 seconds. You need to use FTP to download large files."

Regarding this issue with some hosting companies. 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.

However, it does NOT, and cannot, work around script time limits ( i.e. upper limits ) imposed by your hosting company. s2Member DOES automatically set the script timeout limit to 'inifinite' before initiating the file download, in an attempt to avoid the issue on many server platforms. But in some cases, particularly with shared hosting, extremely large files may still be subjected to limitations imposed by your hosting facility. In these cases, you will need to acquire a dedicated server instead.

Re: Internal Server Error when attempting a download

PostPosted: June 29th, 2011, 2:09 pm
by sandlily
So, i asked them how big the files can be in order to download comfortably, and they said:

"Please note that in our server the maximum execution time for PHP script is 60 seconds. However, as we have responded earlier since the size of your zipped files are huge your PHP script is not getting execute within 60 seconds and producing 500 server error. Hence, I suggest you to optimize the script in such a way that it should execute with 60 seconds while uploading the files."

But that doesn't help me as i have no idea what file size will be sure to execute within 60 seconds...

Can you suggest an upper size limit (in MBs ?) for my mp3 (zipped) files?

Re: Internal Server Error when attempting a download

PostPosted: June 29th, 2011, 5:47 pm
by Jason Caldwell
It's very difficult to predict, because the amount of time it takes to complete the file download, is also dependent upon the connection speed of your Customer. For instance, if a Customer is using a slow connection, it could potentially take 5 minutes for them to download a very small file even.

In cases such as yours, I would suggest using Amazon S3 to store your protected files, as the integration between s2Member -> Amazon S3 is NOT subjected to this limitation. You can learn more about s2Member's integration with Amazon S3 in your Dashboard, under:
s2Member -> Download Options -> Amazon S3.

Re: Internal Server Error when attempting a download

PostPosted: July 8th, 2011, 1:45 pm
by sandlily
Hi guys, I hope everyone had a nice 4th of July weekend.
I convinced my client to create smaller files when recording his upcoming conferences, and we're thinking about changing web host in the future. However, breaking down these giant files we have may be too big a project... so my question is this: what are the chances of the huge file downloads working if i use an Amazon S3 bucket? I'm going to use Amazon S3 with our new files (thanks for the suggestion!), but i'm wondering if we should bother trying to sell the current ones thru s2member with S3, or should we just leave them where they are (e-junkie, which has been problematic, but we can get by)?
Thanks a ba-zillion,
bianca

Re: Internal Server Error when attempting a download

PostPosted: July 8th, 2011, 5:17 pm
by Jason Caldwell
Thanks for the follow-up.
s2Member configured to work with Amazon s3 works VERY reliably. You shouldn't have any issues with even multi-gigabyte files loaded through s2Member. When s2Member is integrated with Amazon s3, you can protect and serve large files, no matter who your host is.

Re: Internal Server Error when attempting a download

PostPosted: August 23rd, 2011, 10:52 am
by sandlily
Hello again (=

I have created an Amazon S3 bucket and entered all the requested info under Amazon® S3/CDN Storage in my S2member Download Options, but now I can't figure out how to change my download link. I've tried several different 'paths' but none of them work. When I keep "?s2member_file_download=" I get the confirm download window but after clicking OK i get an error message starting with: "SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.47 45 54 0a 0a 0a." When I remove "?s2member_file_download=" i get a "page not found." How do i create a download link now that i'm using amazon S3?

Also, is there any way to just skip the whole membership/sign in thing and deliver a download link to the customer upon purchase?

blessings,
bianca

Re: Internal Server Error when attempting a download

PostPosted: August 23rd, 2011, 10:10 pm
by Cristián Lávaque
Have you double checked your s2Member-S3 configuration to make sure you copied the right values? WP Admin -> s2Member -> Download Protection -> Amazon S3

About not requiring the registration/login before download, you could sell a page were you'd put the links to the files, instead of selling the membership or custom capability. http://www.s2member.com/specific-posts-pages-video/

Re: Internal Server Error when attempting a download

PostPosted: August 25th, 2011, 3:41 pm
by sandlily
Hi Cristián,

Thanks for getting back to me. Do you mean the security key values under WP Admin -> s2Member -> Download Options -> Amazon® S3/CDN Storage Option? If so, then yes, I have made sure I copied them correctly. Could this problem have anything to do with that php file you had me create way back that resides in /wp-content/mu-plugins/s2-hacks.php (including the code: "ws_plugin__s2member_stream_file_downloads", "__return_false")?

bianca

Re: Internal Server Error when attempting a download

PostPosted: August 26th, 2011, 9:51 pm
by Cristián Lávaque
I don't think it does, but I really don't know very much about this problem. I'll wait for Jason to get back to this thread. Thanks for your patience!

Re: Internal Server Error when attempting a download

PostPosted: August 27th, 2011, 2:41 pm
by Jason Caldwell
No, the hack should not affect functionality provided by Amazon S3. If you are going to use Amazon S3, you could in fact remove that hack file, because it really does nothing when/if Amazon S3 is being used.

This error you are receiving:
Code: Select all
"SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided
Has to do with specifically with your Amazon S3 Bucket. This would indicate to me that you have not correctly filled in the configuration fields for Amazon S3, under: s2Member -> Download Options -> Amazon S3. If this problem continues, please send us a download link and a test Username/Password so we can run diagnostics for you. Please send those details via this private contact form: http://www.s2member.com/contact/

Re: Internal Server Error when attempting a download

PostPosted: August 30th, 2011, 3:36 pm
by sandlily
Hi Jason,
I sent you a message via the contact form; did it go through?
Thanks,
bianca

Re: Internal Server Error when attempting a download

PostPosted: August 30th, 2011, 6:09 pm
by Jason Caldwell
Thank you. Information received.
I'll investigate this for you shortly.

Re: Internal Server Error when attempting a download

PostPosted: August 31st, 2011, 12:19 am
by Jason Caldwell
Thank you. I just reproduced the problem on my end. What version of WordPress and s2Member are you running please? Also, can you please post and/or email some screenshots of your Amazon S3 configuration for s2Member?

Re: Internal Server Error when attempting a download

PostPosted: September 1st, 2011, 12:06 pm
by sandlily
Hi Jason,

Yay!! When I saw your message I went and updated my WP and s2Member versions to 3.2.1 and 110815 and now my download links are working (for logged in members) -- thank you!

However, I would really like to make use of the SPECIFIC PAGE sale option. I was able to configure this so I gained buy-now access to the page -- but unable to download the file (through a link on that page). I see under Advanced Download Restrictions that for this to work I need to "force s2Member to allow File Downloads, using an extra query string parameter ( s2member_file_download_key )."? but when I tried to install the "PHP Execution" plugin it didn't work (i didn't see anywhere to activate it) then I noticed that on the plugin page it says "Compatible up to: 2.8.3". Am I right about needing this extra PHP code snippet for non-members to download a file? If so, should i be able to make that plugin work?