Jump to content

Digital download files corrupted


Guest awpvicki

Recommended Posts

Guest awpvicki

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....

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

Guest MSEagle2

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)

Link to comment
Share on other sites

  • 3 months later...
Guest gis100

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.

Link to comment
Share on other sites

Guest gis100

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?!

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...
Guest HSN_Tom

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

Link to comment
Share on other sites

Guest HSN_Tom

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...