Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Fatal Error: Digital Download link
Tagged: digital download, downloads, S3
- This topic has 8 replies, 3 voices, and was last updated 12 years, 11 months ago by wzp.
-
AuthorPosts
-
December 21, 2011 at 6:08 am #5093jfkindcMember
Testing my new shopping cart. Regular purchases work just fine.
When clicking on a purchased digital download link I got a fatal error.
The file is a .mov file. The paypal purchase went smoothly. I clicked on link in the email I received.
Here is the error message:
“Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 53215305 bytes) in /home/content/86/8319386/html/wp-content/plugins/wp-cart-for-digital-products/mask.php on line 48”
Here is the code from lines 46-49 in mask.php:
while (!feof($fp))
{
$content .= fgets($fp, 128);
}
Thanks for your help with this!
December 21, 2011 at 6:22 am #39925adminKeymasterIt looks like your server is running out of memory. This happens when your server has very limited PHP memory allocated to your hosting account. By memory we are referring to the RAM memory not the hard disk space. We know that you probably have unlimited disk space. This is where a lot of hosting company gets you… they don’t tell you how much RAM memory you have available to your PHP applications such as WordPress.
Please see the following post for more information on this: http://www.tipsandtricks-hq.com/ecommerce/selling-large-files-with-wp-estore-796
December 22, 2011 at 10:02 pm #39926jfkindcMemberI was impressed by how quickly you replied before!
The file I am trying to view is 1.05 GB so I decided to try the Amazon S3 service. For testing purposes I used a test .mov file that is only 40MB. I moved the test file to their bucket and attempted the purchase again.
I got a similar error but it references a different line of code in the mask.php file…
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 39284013 bytes) in /home/content/86/8319386/html/wp-content/plugins/wp-cart-for-digital-products/mask.php on line 60
I do not want to host the site on the S3 service, just the digital download. If the server where the web site is hosted is doing this masking than I do not understand how the S3 service is supposed to help…
December 22, 2011 at 11:14 pm #39927jfkindcMemberI realized that I had not properly configured the S3 add-on settings so I corrected those.
When I purchased the test file earlier I used the Downloadable setting to make sure that the strict download would work without masking. The download worked without a hitch from the S3 server.
I continued testing by changing the settings to “Pay per view” and re-purchased the digital link. When the email arrived with the link for the streaming video I noticed that the link was identical to the previous link. I went ahead and clicked on it figuring that the shopping cart would resolve the link using the new settings.
Unfortunately, the entire test file downloaded to my Mac. Do I need to delete this product and add it again with the pay per view option selected? We only want people to be able to rent the training film for 24 hours without getting a downloaded copy.
What should I do next?
December 22, 2011 at 11:20 pm #39928wzpModeratorThe S3 service helps in several ways…
1. You are offloading the burden of downloading data from your server, to the Amazon S3 network. Some servers just can’t handle the load of large downloads; due to restrictions imposed by the hosting provider, or other technical limitations.
2. Bandwidth. No matter how fast your hosting provider claims to be, Amazon is faster; because they are bigger.
3. Session timeouts. At 1 GB, you will experience the phenomena of having the download script terminated by the server, because it thinks the script is taking too long to complete.
For more information, please see…
http://www.tipsandtricks-hq.com/a-bucket-full-of-objects-amazon-s3-3052
As for your specific error message; @Admin is correct, you are running out of memory on the server. You could try asking your provider to help increase the memory limit, but I think you are best served by moving the video file to Amazon.
December 22, 2011 at 11:26 pm #39929wzpModeratorIf you do not want buyers to actually download the video, just view it, perhaps this might be of interest to you…
December 23, 2011 at 1:31 am #39930jfkindcMemberThanks again for such a rapid response.
“Viewing” is exactly what I want the users to be able to do. My client calls this an “online rental” function. We want users to have a link to stream a video as often as they want for a period of 24 hours without them being able to download it.
I thought the “Pay Per View Content” option would do just that. (Lightbox is not a good solution because I do not want the movie to pop out but just be on their browser screen.)
For the “Pay Per View Content” option the text says, “For pay per view content, the true URL of the page where the content is embedded (e.g. a steaming video) does not get revealed.”
If the video is embedded into a html page than what keeps the user from viewing source and seeing the location of the video file?
Can the shopping cart create a direct link for viewing the file for 24 hours without being able to download it?
December 23, 2011 at 2:29 am #39931wzpModeratorThe only way to prevent downloads is to use an embedded player. When you stream to the browser, there is no way of protecting the content from being saved; encrypted link or not. That’s because you have no way of knowing what’s happening to the stream, when it hits the buyer’s computer.
December 23, 2011 at 2:31 am #39932wzpModeratorIf you use an embedded player, you can protect the page with the APR shortcodes. Access to the protected page can be limited to 24 hours.
http://www.tipsandtricks-hq.com/ecommerce/using-wordpress-permalinks-as-digital-products-apr-1217
-
AuthorPosts
- You must be logged in to reply to this topic.