I have a similar problem with corrupt downloads.
Are you outputting any HTML after your download?
or
If, like in my scenario, you have 2 php files, A and B. A calls B, B downloads a file, but A continues to output HTML after the call to B. And hey presto, a corrupted download.
If you have any of the above scenario's, try not executing any php, or outputting any html after your download statement.
I am still trying to figure out the neatest way to log a download, fire off the download process, and keep the user on the same web page. I have had to resort to javascript: this.Open command.
Graham.