Jump to content

SOLVED: Video downloads and zip files become corrupted upon download


Recommended Posts

Hi guys,

 

I have searched everywhere and have gotten a lot of clues; but no actual solution yet.

 

My problem might have to do with Apache, Zlib, Gzip or Prestashop 1.4.8.2, so please bear with me.

 

When a customer purchases a download from my store, the checkout goes flawless. However, when the files are being downloaded to the clients computer, the trouble begins. To keep it short:

 

Issue 1) Video files such as .MP4 files become corrupted upon download and won't play on the clients computer.

 

Issue 2) ZIP-files end up in the following format immediately upon download: .CPGZ

This renders those ZIP archives unusable, as they will get caught up in an everlasting loop of unzipping...

 

I have dug deep into Apache and have experimented with PHP settings as Flush, ZLIB etcetera but this doesn't solve the problem. I have also edit several Prestashop php files but to no avail either.

 

I am ready to make the move to other ways of providing video to get away from the hassle of file downloads altogether, but you guys are my last hope.. Would love to see this download issue sorted!

 

thanks :)

Edited by prestaquest (see edit history)
Link to comment
Share on other sites

thanks for the reply.

 

the following solved it:

 

adding ob_end_clean(); after ob_end_flush(); in get-files.php

 

source:

http://www.prestashop.com/forums/topic/89448-solved-ob-end-flush-zip-download-problems-encoding-gzip-problem-prestashop/

 

The following might also help you:

 

turn off ZLIB in your PHP settings

turn on FLUSH in your PHP settings

 

add the following to .htaccess:

 

SetEnv no-gzip dont-vary
AddType video/mp4 .mp4
AddType application/octet-stream .zip

 

and turn off .htaccess optimization.

Edited by prestaquest (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...