Downloading Files from the server.

I run a pdf manual store, so I sell manuals. everything works great, but the last 2 weeks I have been getting complaints that the files being downloaded are corrupt, not everyone, just a few. Maybe 5 or 6 times in the last 2 week. There has been maybe 20 files sold in the last 2 weeks, so its only about 1/4 of them showing up as corrupt.

I have checked them out on the server, and the files are fine, so it has to do with the downloading. I had a customer buy a manual last night, and he called me this morning. He said he downloaded the manual 5 times last night, each time it said the download was complete, but when he tried to open the pdf file he was told the file was corrupt.

He is using IE8. I had him try it again this morning, and it downloaded correctly, and opened fine. I have checked the Apache error log, and the access log, but there are not errors logged.

This site has been up for the last 5 years, and I have only seen this problem maybe a couple of times, but in the last 2 weeks it happened 5 or 6 times. I'm not sure if this is a Server problem, or a Xcart problem. (that is my e-commerce program).

I have left a simulator message on the Xcart Forum, to see if anyone else has seen this. I am also going to start to keep a log of of operating system, Browser version, and internet provider to see if I can see a connection.

Do you have any other Ideas to try, I'm open to suggestions.




I'd be surprised if it turned out to be an Apache problem. That said, if you have Apache setup to compress PDF files (not the default), or if your application is using it's own compression of some sort, you might consider disabling that to see if that helps.

It sounds like you've been doing this, but I'd keep an eye on your Apache errors logs (both in /var/log/httpd/error_log and $HOME/logs/error_log) to make sure nothing strange is going on.

Also, if a router or datacenter between one of your customers and your server is having network problems, that could potentially cause what you're seeing. You might consider running some traceroutes between folks that have this problem and your server, to see if any problems show up.

Also, it would be useful to compare the corrupted vs original PDF files, to see exactly how they were corrupted. If the downloaded file is cut off before the end, that might suggest that some timeout or network failure is happening before the download completes.

PDF's are not getting compressed, so that's not it. I did notice that all 5 times he tried to download the manual, was with the original connection. In other words, after you complete the Purchase, it gives you an option to download with out leaving the site. It also sends you an email with a download key. Both go to the same page to actually download the manual. After he tried the email download key, it downloaded correctly.

I also noticed he payed with his PayPal account , maybe after being returned to the store, his connection had changed, so maybe that is the problem. When he reconnected directly to the Store with the Email Download Link, it downloaded correctly. I will have to watch to see if any others with a PayPal Account comes through with a errors.

Thanks for the thought.