latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

S2Member File Download/Cloudfront Not Working

Home Forums Community Forum S2Member File Download/Cloudfront Not Working

This topic contains 9 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 6 months ago.

Topic Author Topic
Posted: Saturday Jun 23rd, 2012 at 6:39 pm #17259
Erik Kampe
Username: kampester


I have setup the File Download Options in S2Member Pro to work withe S3/Cloudfront and it works fine with JWPlayer config RTMP streaming.

The “Delivery Mentod” status in the AWS Management Console>Amazon Cloudfront is enabled from both steaming and download.

However, for some reason, I can not get the simple/basic short code or advanced links to work. Here are my test link codes:

	<li><a href="[s2File download='scripts/mt4/Magnified_Market_Price.ex4']"> 1 Magnify Market Price shortCode basic </a></li>
	<li><a href="[s2File download='license.txt' download_key='true'/]"> 2 Text File Download key=true</a></li>
	<li><a href=""> 3 Text File Download url </a></li>
	<li><a class="mceWpPHP" title="php" href=";s2member_file_download_key=&lt;img src=">4 Test me php </a></li>

The output in html is as follows:

<li><a href="">1  Magnify Market Price shortCode basic </a></li>
<li><a href=";s2member_file_download=/license.txt">2 Text File Download key=true</a></li>
<li><a href="">3  Text File Download url </a></li>
<li><a href=";s2member_file_download_key=&lt;img src=" title="php" class="mceWpPHP">4 Test me php </a></li>

Perhaps someone can direct me if I am using incorrect code or if the output code hints to a problem area.

When the output links are clicked I get an xlm: “access denied” messages for the first 3 links. The 4th link produces a 503 (invlaid key err msg:

03 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.

Any thoughts?



List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Sunday Jun 24th, 2012 at 5:14 am #17272

Hi Erik.

Did you double check that your Basic Downlaod Restriction, Amazon S3 and CloudFront settings are all properly set up?

Where you logged in when you tried the downloads?

Could you send your login info to take a look if the above doesn’t help? s2Member® » Private Contact Form

Thanks. :)

Posted: Sunday Jun 24th, 2012 at 2:40 pm #17288
Erik Kampe
Username: kampester

Thanks Cristian

From my side I believe that everything is setup correctly, and I logged in with different levels, super admin, admin, level 2, level 1 and level o.

No of my download links seem to work, yet the video streaming is working ( all from CloudFront)

I sent you log in info via private contact form


Posted: Sunday Jun 24th, 2012 at 5:07 pm #17298

Thanks! I took a look but can’t tell what’s wrong, so I forwarded it to Jason.

Posted: Monday Jun 25th, 2012 at 8:38 pm #17438
Erik Kampe
Username: kampester

Thanks Cristian …. I tried to deactivate all plugins, disabled my CDN – nothing is working so far.

Look forward to hear From Jason and next steps on what I can try.

Posted: Wednesday Jun 27th, 2012 at 2:58 pm #17681
Erik Kampe
Username: kampester

Hey guys, any thoughts?

I am waiting for your feedback, thanks !

Posted: Wednesday Jun 27th, 2012 at 5:10 pm #17698
Staff Member
Thanks for your patience.
I’ve just taken a quick look at your installation.

I was unable to log in via FTP, so I could not run a full set of diagnostics. If you’d like me to do that, please submit a new Dashboard login and FTP access through our private contact form here:
s2Member® » Private Contact Form

When I attempted to log in via FTP and/or SFTP, the connection just kept hanging.

Here are some things that come to mind:

Does your server accurately report the current visitor’s IP address through $_SERVER['REMOTE_ADDR']?
Run a test script, with the following code. You also need to make sure that your server has the OpenSSL extension installed. This test script should help you with that.

// Check for OpenSSL support.
 echo 'openssl_sign() exists.';
 // Check this environment variable.
echo $_SERVER&#91;'REMOTE_ADDR'&#93;; // Is this you?
Posted: Thursday Jun 28th, 2012 at 1:34 am #17723
Erik Kampe
Username: kampester

HI Jason

I resent the FTP cpanel login via private.

NExt… the script you posted above works:

openssl_sign() exists.

Thanks Big Time


Posted: Saturday Jun 30th, 2012 at 7:15 am #17941
Staff Member
Thanks for the follow-up.
~ I’m running diagnostics now.
Posted: Saturday Jun 30th, 2012 at 9:31 am #17953
Staff Member

Investigation completed.

It looks like the CloudFront Distributions that s2Member configured, were somehow accessed by another software application, which is using a different version of the CloudFront API. This seems to cause some problems on the CloudFront side of things, due to some recent changes/updates from Amazon.

Amazon just recently released a whole new API for their services. Some software applications (like s2Member) are still using the previous version, and some are now using the new version. If two different software applications attempt to configure CloudFront distributions, but in different ways (i.e. with two different APIs), it forces future API requests to occur with the latest version; else they will fail.

I believe this is the underlying cause of the problems that you’re experiencing. s2Member is NOT using the latest version of the Amazon API. It was only recently released, and while work is underway to keep things updated, we’re not there yet. s2Member uses API version: 2010-11-01 (the previous version).

The newest version is: 2012-05-05.

Here’s what I suggest.

In most scenarios, ONLY s2Member is going to access your CloudFront Distribution configurations. Therefore, I would simply start over from scratch, and let s2Member re-configure things for you.

1. Log into your Amazon CloudFront console at
2. Manually disable (and then delete), both of your existing s2/CloudFront Distributions.
3. Then come back to your installation of s2Member, and check the box to re-configure CloudFront.

This will give you a fresh start, and s2Member’s integration should start working for you again, as expected.

Preventing this from happening again.

* Please do NOT configure another software application, running on a different API version, to communicate with these CloudFront Distributions. This seems to cause a conflict on the Amazon side of things, and future API calls may fail. Hopefully they’ll get this fixed asap. I’m reporting this now.

Viewing 9 replies - 1 through 9 (of 9 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.