Guest awpvicki Posted November 14, 2009 Share Posted November 14, 2009 Over the past two days, we have had serious problems with our digital download links. The links are delivered to the customer and when they download, anything larger than 10MB, downloads as a very small file and is corrupted. As we sell only digital products, this is causing MAJOR problems for us. Does anyone else have the same problem and know the solution? Our files are zip files and we've never had a problem before two days ago. Update: if we change our links to http links rather than root - they work, but this is not ideal.... Quote Link to comment Share on other sites More sharing options...
Guest pamdc Posted November 20, 2009 Share Posted November 20, 2009 I have just started having the same problem after everything working perfecty for about a year now. I too am searching for a solution to this problem. If you find one outwith this forum, please share Pam DC Over the past two days, we have had serious problems with our digital download links. The links are delivered to the customer and when they download, anything larger than 10MB, downloads as a very small file and is corrupted. As we sell only digital products, this is causing MAJOR problems for us. Does anyone else have the same problem and know the solution? Our files are zip files and we've never had a problem before two days ago. Update: if we change our links to http links rather than root - they work, but this is not ideal.... Quote Link to comment Share on other sites More sharing options...
Guest MSEagle2 Posted November 20, 2009 Share Posted November 20, 2009 had this too. Found a solution - you need to link to an .exe file (instead of a .zip or other compression format) You can use 7zip to make an 'archive' of the file(s), select 7z as the compression format, and check the SFX box (makes it a self extractor aka a .exe) Quote Link to comment Share on other sites More sharing options...
Guest gis100 Posted March 17, 2010 Share Posted March 17, 2010 Try to use this script to create digital downloads: http://www.zubrag.com/scripts/download.php It is easy to configure and just one file to upload to the server. It also protect files against hot-links Quote Link to comment Share on other sites More sharing options...
Guest gis100 Posted March 17, 2010 Share Posted March 17, 2010 I tried to replace this code in includes/functions.inc.php http://www.zubrag.com/scripts/ 'PHP File Download Script 1.3') header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header('Content-Disposition: attachment; filename="'.basename($path).'"'); header("Content-Type: application/octet-stream"); header("Content-Length: ".filesize($path)); header("Content-Transfer-Encoding: binary"); ## IE 7 Fix header('Vary: User-Agent'); if ($file = fopen($path, 'rb')) { while (!feof($file)) { // && !connection_status()) { fpassthru($file); } fclose($file); } for this fresh one (copied from header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header('Content-Disposition: attachment; filename="'.basename($path).'"'); header("Content-Type: application/octet-stream"); header("Content-Length: ".filesize($path)); header("Content-Transfer-Encoding: binary"); ## IE 7 Fix header('Vary: User-Agent'); if ($file = fopen($path, 'rb')) { while (!feof($file)) { // && !connection_status()) { print (fread($file, 1024*8)); flush(); if (connection_status()!=0) { @fclose($file); die(); } } fclose($file); } please report if it worked for all of you. I'm fine at the moment with my store closed, but after i fully finish my won tests with several downloads at once I'll test with my usual 6000 daily customers navigating in my store and hungrily devouring the bandwidth by downloading hugue digital products. Quote Link to comment Share on other sites More sharing options...
Guest gis100 Posted March 17, 2010 Share Posted March 17, 2010 Sorry...last code didn't worked!!! I'll try to manage it better and investigate. Any help from Cubecart support is really appreciated. They can not consider this a 'MINOR ISSUE' since many of us we only sell digital goods. It's strange that this issue started suddenly to many of us, after years working with no issues. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2010 Share Posted March 23, 2010 It's strange that this issue started suddenly to many of us, after years working with no issues. I've had this happen to me too within the past week. As the store is digital downloads only and I have a job that means I can't always help customers immediately, it's a tad awkward. The solution of saving Zip files as .EXE is not really a solution - I have hundreds of old files I'd need to convert and reupload - no real time for that unless I have to, plus I wouldn't feel comfortable sending customers a .EXE file. Anyone know why this has suddenly happened? And is there a dead easy solution? I'm wary of fiddling with code that I don't understand. Best wishes ?hil Quote Link to comment Share on other sites More sharing options...
Guest Posted March 27, 2010 Share Posted March 27, 2010 It's strange that this issue started suddenly to many of us, after years working with no issues. I've had this happen to me too within the past week. As the store is digital downloads only and I have a job that means I can't always help customers immediately, it's a tad awkward. The solution of saving Zip files as .EXE is not really a solution - I have hundreds of old files I'd need to convert and reupload - no real time for that unless I have to, plus I wouldn't feel comfortable sending customers a .EXE file. Anyone know why this has suddenly happened? And is there a dead easy solution? I'm wary of fiddling with code that I don't understand. Best wishes ?hil It appears to have righted itself - and I've not touched anything. Is it too much to hope that this is just a blip?! Quote Link to comment Share on other sites More sharing options...
Jayden Posted March 30, 2010 Share Posted March 30, 2010 I am now encountering the exactly same problem for a week or so. Have you found a solution? Does anybody has a clue? Please help. Thanks very much. Over the past two days, we have had serious problems with our digital download links. The links are delivered to the customer and when they download, anything larger than 10MB, downloads as a very small file and is corrupted. As we sell only digital products, this is causing MAJOR problems for us. Does anyone else have the same problem and know the solution? Our files are zip files and we've never had a problem before two days ago. Update: if we change our links to http links rather than root - they work, but this is not ideal.... Quote Link to comment Share on other sites More sharing options...
Guest Posted April 1, 2010 Share Posted April 1, 2010 It appears to have righted itself - and I've not touched anything. Is it too much to hope that this is just a blip?! Nah, it's doing it again. Not sure why! Quote Link to comment Share on other sites More sharing options...
brand80 Posted April 4, 2010 Share Posted April 4, 2010 I have the same zip file corruption when a customer downloads a digital file after upgrading php to anything higher than php 5.2.9... So at the moment I am stuck there, I have tried 5.2.12 and most of the 5.3.x in cpanel and I still get the corrupt zip files, however if I downgrade back to 5.2.9 it works fine again.... Its aggrevating because I have to stay PCI compliant and I no longer am on 5.2.9, I really need to go to 5.3.x... The last two times PCI compliance scans came around I had to upgrade and then downgrade after the scan, which I hate doing... Please help, hopefully, maybe staff will chime in? Thanks! Brandon Quote Link to comment Share on other sites More sharing options...
Guest HSN_Tom Posted April 23, 2010 Share Posted April 23, 2010 Yup, I have exactly the same problem at my end. We are only running php 5.2.11 and nothing I try works (except for the .exe). The .exe method is not great as many antivirus providers block it as default, and might I add Apple MAC users cannot open them as it is a windows based format. on average at 80 - 100mb per zip file im left explaining to customers why the product firstly has been removed from the site for sale, and secondly why their links dont deliver. Are there any fixes please? This is beginning to hurt, and we have only recently taken to using cubecart :s Quote Link to comment Share on other sites More sharing options...
Guest HSN_Tom Posted April 23, 2010 Share Posted April 23, 2010 Right ok, I know that this subject technically is old, however the fix is in the update. I havent applied the entire update yet, but rather jumped straight to the functions.inc.php file to see if any alterations have been made to the header area. This is how mine now looks header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header('Content-Disposition: attachment; filename="'.basename($path).'"'); header("Content-Type: application/octet-stream"); //header("Content-Length: ".filesize($path)); header("Content-Transfer-Encoding: binary"); ## IE 7 Fix header('Vary: User-Agent'); if ($file = fopen($path, 'rb')) { while (!feof($file)) { // && !connection_status()) { echo fread($file, 8192); flush(); } fclose($file); } return (!connection_status() && !connection_aborted()); } This works for me in downloading an 81mb file, zip also. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.