View Full Version : oscommerce, selling download file problem
lindascott121
11-29-2007, 01:02 PM
Hi - my site will be selling pdf files (small- less than one mb) that currently I have in a zipped file. Everything works swimmingly until, when I test the purchase, I try to open the zip file on my computer. I get an error message saying that the file is corrupt, or the archive is not valid. I am able to open other zips. I am able to click on a zip file on the server site, download and open. The newly purchased zip file and the original are the same size. I have tried a few changes to download.php, that I saw mentioned on the boards, but nothing works. I have tried disabling my firewall, and not going thru my router, also to no avail. bluehost support says its a coding error -........Any ideas?
Thanks
felgall
11-29-2007, 01:37 PM
Can you post the code you are using to deliver the zip file for download?
lindascott121
11-29-2007, 06:46 PM
This is part of the download php file - attached is the whole dang file.
//Now send the file with header() magic
header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: Application/octet-stream");
header("Content-disposition: attachment; filename=" . $downloads['orders_products_filename']);
I did discover that on at least on of the files, the size downloaded after "purchase" is one kb bigger than the original so something I am doing is adding extra code.
Thanks for your help.
Linda
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.