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™

Large file downloads / tiny URL issue?

s2Member Plugin. A Membership plugin for WordPress®.

Large file downloads / tiny URL issue?

Postby Harmonica Notes » October 25th, 2010, 4:53 pm

I have a customer on email that just purchased a video series from me. They get to the download page and can see the links but when he clicks on the link it takes him to the squeeze page.

He says the link is a tiny url instead of the download.

When I look at them it shows the link and I can download the files.

I have him on email right now and am trying to get him fixed since he just bought otherwise I would do a more thorough search of the forums.

Can anyone link me to a post in the forums with an answer or give me a quick answer to get him up and running?
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Harmonica Notes » October 25th, 2010, 7:40 pm

I've learned more about this error. I can replicate it. I use the customer service url generator and create a new link to the page. I then send it to my test computer and try it. I can get to the download page but when I try to download it redirects me to the membership page there is also this ...?s2member_level_req=0... in the url.
The only user level access I have created was level 0 which I needed to create the the single page buy now button.
I'm certain this is a configuration error on my part. I just need to figure out what the problem is. I don't want to create a user site (yet) but I do want to sell e-products.

Any ideas would be appreciated including "moron, you need to look here..."
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 25th, 2010, 10:51 pm

Thanks for reporting your experience.
I use the customer service url generator and create a new link to the page. I then send it to my test computer and try it. I can get to the download page but when I try to download it redirects me to the membership page there is also this ...?s2member_level_req=0... in the url.

OK. So they're gaining access properly, but the download itself is failing.

It sounds to me like you're using s2Member's "Specific Post/Page Access" feature; which is NOT a part of s2Member's core functionality ( Membership management ). In other words, you've inadvertently mixed File Downloads ( a part of Membership Level Access ) with Specific Post/Page Access.

That being said, File Downloads CAN be made to work with Specific Post/Page Access.
- How to mix File Downloads with Specific Post/Page Access:

On the Post or Page that you're selling access to, whenever you create your download links, you will need to apply "Download Keys". You will find full instructions in your Dashboard, under:
s2Member -> Download Options -> Advanced Download Restrictions

---------------------------------------------------------------------------------------------------------

Advanced Download Restrictions ( optional, for greater flexibility )

By default, s2Member uses your Basic Download Restrictions, which work with Membership Level Access. However, you can force s2Member to allow file downloads, using an extra query string parameter ( s2member_file_download_key ). A file download `Key` is passed through this parameter, and it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may, or may not, have configured.

Code: Select all
http://www.example.com/?s2member_file_download=example-file.zip&s2member_file_download_key=<?php echo s2member_file_download_key("example-file.zip"); ?>

The function `s2member_file_download_key()`, is part of the s2Member API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces ( at the time it is produced ), will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by s2Member. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let's take a quick look at what s2member_file_download_key() actually produces.

s2member_file_download_key ("example-file.zip") = a site-specific hash of s2member_xencrypt(date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file)

When s2member_file_download_key = a valid Key, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend s2Member's file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.
~ 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: tiny URL single post/page problems.

Postby Harmonica Notes » October 25th, 2010, 11:00 pm

Yeah, I figured that out and implemented it. It solved my problem and I can get him to Download. Here's the kicker, the file sizes are 4k. they should average around 250 mb.

I love the functionality of the plugin. I figured there would be some growing pains and my customer is cool and helpful (Yay!!) I will eventually be doing this on a larger scale and this is a trial run. I'm glad for the troubles and the help.

Any ideas on why the file size problem?
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 25th, 2010, 11:14 pm

Awesome. Glad to hear that.
Thanks for reporting back on this.


Hmmm.. 4k file size. You've got me on that one.
So the file is corrupted?

You might try to re-upload all of your files to the /s2member-files/ directory. Make sure you upload images, music, and other non-text files in BINARY transfer mode. Only text/code files should be uploaded in ASCII format.
~ 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: tiny URL single post/page problems.

Postby Dr Dave » October 26th, 2010, 10:36 pm

You might also just check your file size using your ftp client. That will at least give you a head start in determining whether you've got some "bulk" in there.

(Beats having to spend the time uploading 250 mb for nothing, yes?

I'd be interested in the outcome of this question, because I think I ran across it somewhere in the past. (Maybe something will jog this "ancient" memory;-)
User avatar
Dr Dave
Experienced User
Experienced User
 
Posts: 16
Joined: July 8, 2010

Re: tiny URL single post/page problems.

Postby Harmonica Notes » October 26th, 2010, 11:51 pm

Here's the update.
1. I have a zip file around 8 mb downloading and opening. This is with the s2member download key
2. I can DL the files if I take them out of security.
3. If I remove the download key and try to dl it as while logged in with my admin account, ithas the same problem
4. upped a zip of one of the videos, same problem.

could it be a file size issue?

I have turned off the wordpress code autocorrect stuff and disabled the visual editor.
I just watched the Rocky Horror episode of Glee and dug the Berry Bostwick/ Meatloaf walk on
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 27th, 2010, 2:16 am

Is it possible that your /s2member-files/ directory is actually a symbolic reference?
In other words, where is the actual location of your /s2member-files/ directory on the server?

It should be inside:
/wp-content/plugins/s2member-files/
and /s2member-files/ should be a directory, NOT a Symlink ( aka: a Shortcut ).
http://en.wikipedia.org/wiki/Symbolic_link
~ 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: tiny URL single post/page problems.

Postby Harmonica Notes » October 27th, 2010, 2:29 am

it's in /wp-content/plugins/
If you want, I can send you a link and the page code. You can have a look for yourself. feel free to learn some blues harmonica while you're at it.
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 27th, 2010, 3:19 am

Yes, that would be great. We have another report on this same issue and I would love to get it resolved. If you can provide me with a way to reproduce the issue on your installation, I would be very gracious.

Please use this private contact form:
http://www.s2member.com/contact/

If you can provide a Dashboard login and/or FTP access that would great too. Otherwise, I'll take what you can provide. I have a suspicion the issue is server dependent. So in order to correct this, I'll need FTP access to run some tests.
~ 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: tiny URL single post/page problems.

Postby fitcajun » October 27th, 2010, 4:10 pm

I'm having the same problem.

The tiny URL works just fine. The download key works fine. But my 32.8 mb PDF is downloading as a 241 kb file with no functionality. I used SmartFTP to upload the file to my S2member-files folder within the wp-content>plugins folder on my site. In my FTP viewer the file reads as the proper size. The file opens properly on my computer.

What should I do to fix this?
User avatar
fitcajun
Registered User
Registered User
 
Posts: 3
Joined: October 17, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 27th, 2010, 5:01 pm

Issue possibly resolved:

I believe we have this bug fixed. This odd behavior, when s2Member returns an invalid file size of just a few bytes on large files, was attributed to memory limitations of the readfile() function in PHP.

In the latest build of s2Member v3.2.9+, the issue has been corrected using feof() in chunks of 2048 bytes; so that very large files will no longer be an issue. You can download the latest development release here: http://www.primothemes.com/post/product ... th-paypal/

Thanks to everyone who reported this issue.
Please let us know if you continue to have trouble.
~ 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: tiny URL single post/page problems.

Postby Dr Dave » October 27th, 2010, 8:39 pm

Jason - Just to let you know - I use a number of plugins, but when I see an upgrade coming from the s2member team, it's the very first one I jump on! Bar none, I've learned more from tinkering in the back-end of s2member than I have from ANY other method.

Just sayin',
Dave
User avatar
Dr Dave
Experienced User
Experienced User
 
Posts: 16
Joined: July 8, 2010

Re: tiny URL single post/page problems.

Postby Harmonica Notes » October 27th, 2010, 9:06 pm

I'm still having the same problem. The upgrade looks like It went in fine.

turned off all my plugins except wp exec, akismet and s2member to test if there was a conflict and had the same problem.

Jason. I'm sending you a link to the location so you can check it out yourself.
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Harmonica Notes » October 27th, 2010, 9:20 pm

Yippy! I just crashed my site!. It will be a while before I have it back up so I'll get back to you on access.
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby fitcajun » October 27th, 2010, 9:46 pm

Yeah, I ran the update too and I'm still getting to the download window with my PDF showing only 241 kb of what should be 32.8 mb...

thoughts?
User avatar
fitcajun
Registered User
Registered User
 
Posts: 3
Joined: October 17, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 27th, 2010, 9:51 pm

Sorry for any confusion guys. This update has not been rolled out officially yet. I'm attaching the latest development version for all to use, or you can also download it directly from our website:
http://www.primothemes.com/post/product ... th-paypal/

s2member.zip
(5.49 MiB) Downloaded 464 times
this is s2Member v3.2.9 / build 32
( includes a possible fix for large file downloads )

If all goes well, the change will be released officially with s2Member v3.3.


Scratch this.
Please use build #33 below until s2Member v3.3 is released.
~ 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: tiny URL single post/page problems.

Postby Harmonica Notes » October 27th, 2010, 11:18 pm

Downloaded and installed the zip, file size of download went from 4k to zero.
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: tiny URL single post/page problems.

Postby Jason Caldwell » October 27th, 2010, 11:38 pm

Thanks for the follow-up. I received your Dashboard login via email. The investigation is underway.
Harmonica Notes wrote:Downloaded and installed the zip, file size of download went from 4k to zero.
~ 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: Large file downloads / tiny URL issue?

Postby Jason Caldwell » October 28th, 2010, 5:19 am

Investigation completed. Possible bug fix attached.

Use of PHP's fread() function has been updated to stream_get_contents() with a 2MB chunk size in order to satisfy the needs of site owners delivering VERY large files ( 500MB+ ) though simulated HTTP streams "inline". For instance, an MP4 video file into a FlowPlayer/JWPlayer or another Flash-based application.

In addition, s2Member is now capable of output buffering its chunked file delivery, making it possible for s2Member to deliver VERY large files through most shared hosting platforms without needing to upgrade to a private server.

Related article: ( via Dreamhost )
http://forum.dreamhosters.com/programmi ... d-fail.htm
^ s2Member's file delivery system is now capable of circumventing the limitation discussed here.

This update has not been rolled out officially yet. I'm attaching the latest development version for all to use, or you can also download it directly from our website:
http://www.primothemes.com/post/product ... th-paypal/

s2member.zip
(5.49 MiB) Downloaded 405 times
this is s2Member v3.2.9 / build #33
( includes a possible fix for large file downloads )

If all goes well, the change will be released officially with s2Member v3.3.
~ 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: Large file downloads / tiny URL issue?

Postby Harmonica Notes » October 28th, 2010, 11:47 am

Awesome! It looks to be working great. Jason, you rock. Thanks for the help.
User avatar
Harmonica Notes
Registered User
Registered User
 
Posts: 9
Joined: October 25, 2010

Re: Large file downloads / tiny URL issue?

Postby Dr Dave » October 29th, 2010, 12:31 am

Very cool!
User avatar
Dr Dave
Experienced User
Experienced User
 
Posts: 16
Joined: July 8, 2010

Re: Large file downloads / tiny URL issue?

Postby ryannagy » October 30th, 2010, 1:16 pm

Amazing. Thanks Jason. I will try it out ASAP. - Ryan
User avatar
ryannagy
Registered User
Registered User
 
Posts: 68
Joined: May 18, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron