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™

Error when using large files and download restrictions

s2Member Plugin. A Membership plugin for WordPress®.

Error when using large files and download restrictions

Postby mackey » September 25th, 2010, 1:34 pm

Using latest Wordpress/s2member Pro...

I host large movie files (Usually under 600mb) to subscribers and want to take advantage of the download restrictions.

An example URL is: http://xxxxxxx.com/?s2member_file_downl ... lehere.mp4

It works fine when I use zip files and works great when I tried a file around 50mb, but when I put a larger file in there I get this error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 614318081 bytes) in /home/xxxxxx/public_html/wp-content/plugins/s2member/includes/functions/file-download-access.inc.php on line 268

I contacted our host who upped the php memory limit but when that didn't work, they suggest to contact you. Please tell me there's a way to fix this. :D Thanks
User avatar
mackey
Registered User
Registered User
 
Posts: 11
Joined: August 9, 2010

Re: Error when using large files and download restrictions

Postby drbyte » September 25th, 2010, 10:34 pm

it will always be limited.....there is no way around your request at this moment.

Even if you got it to work, your host will shut you down within days. You need to move to a dedicated server or host your files somewhere else.

A quick and dirty solution would be like what every body else is doing...Split your files.... not larger than 100MB...add each file link to separate pages full of Google ad ads.......it pays good.. ;)

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Error when using large files and download restrictions

Postby ryannagy » October 19th, 2010, 11:12 am

I'm curious if you ever found a solution. I'm about to add:

allow_url_include = on
memory_limit=128M
upload_max_filesize=64M
post_max_size=32m

to my php.ini so that I can upload some large mp3's. Eventually, I will need files sizes of about 250mb for some video files. I hope that it doesn't end up being a problem. I suppose large video files could be hosted on Amazon S3. The cost is rather low.

cheers - Ryan
User avatar
ryannagy
Registered User
Registered User
 
Posts: 68
Joined: May 18, 2010

Re: Error when using large files and download restrictions

Postby Jason Caldwell » October 22nd, 2010, 5:45 am

Hi Ryan. If you're on a dedicated server, it's NOT a problem.
See: viewtopic.php?f=4&t=423&p=1879&hilit=large+file+downloads#p1879

If you're on a shared hosting platform, you WILL have trouble with very large files. There is no work-around for this yet, but we ARE working toward a long-term solution for a future release of s2Member.
~ 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: Error when using large files and download restrictions

Postby drbyte » October 22nd, 2010, 10:20 pm

Hi Guys,

Actually there is. Here are the steps:

1. Inline File Extensions ( optional, for content-disposition )

Add the file extension to the list. One file only. In my case I added .mp4

2. save

3. add this code to your template or create a Custom fields

Code: Select all
<a title="Pro" href="http://www.site.com/?s2member_file_download=sample.mp4">Download Movie - Right Click and Save As</a>



For custom filed add this:

Code: Select all
<?php echo get_post_meta($post->ID, download, true); ?>


download can be anything...that's just an example

4. Go to your post and Custom Filed------>Enter new-----> enter download (lower case only)

5. add this code to either, save
Code: Select all
<a title="Pro" href="http://www.site.com/?s2member_file_download=sample.mp4">Download Movie - Right Click and Save As</a>


Now, in Firefox, you have to right click and save link as. for IE click on the link and it will save the movie, in Google Chrome, click and it will save the movie.

Hope that helps

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron