I'm receiving a file is corrupt error when download a file using the Download Expander link.
Posted by Nick Poindexter on 04 March 2010 04:56 PM
A corrupt file can be caused by a number of different items.|
1. Whitespace being sent out of the PHP file before the contents of the zip file. If you see this message on your site sometimes "If the page is not updated in 2 seconds, please follow this link" this may be the cause. Here are instructions for finding this extra whitespace: http://www.alteredcart.com/support.php?section=knowledgebase&articleid=52
2. You may be using Zlib compression. This can corrupt the .zip file.
--If zlib is enabled in the .htaccess file use the following code to disable this for the download.php file:
php_flag zlib.output_compression Off
-- If zlib is enabled in your php.ini file you can disabled it by adding this code to the top of the download.php file:
3. Your site is timing out during the download. If the .zip file download is smaller than the file on the server the site is timing out before the entire contents of the download have been received by the customer. You can try to add this to the top of the download.php file to extend the execution time, but some web hosts disable this: