Andreas Magnusson wrote:
I'm writing a script to view/download an email-attachment. If the file happens to be an MS Word document and the browser IE (only tried with 6.0), then the download fails. If I choose to download (Content-Disposition: attachment; filename="whatever.doc") then only a part of the file (2/3) is saved to disk. Of course viewing the file doesn't work either. It doesn't seem to matter what I set the Content-Type to since IE seems to ignore that anyway, however I've tried application/msword, application/octet-stream and some others. I've tried all the things said in the comments to the header-function in the online-docs at php.net. I know my Content-Length header is correct and the whole procedure works great with Netscape 7.0 and if the attachment is a zip-file or a jpeg-image it also works in both IE and Netscape.
Once a user of the PHP Classes site reported a similar problem when downloading zip versions of the class archives.
I report a problem to Winzip support people and sent me the following reply.
Notice, in the PHP Classes site, downloads support byte range requests, which are used by download managers to fetch files in many chunks.
It looks to me that the problem is due to a bug in IE as reported in the address below.
We typically see this behaviour when the temporary internet files folder is full; you might try clearing some files from this location, either manually or via your browser's options.
There's also a known issue with the internet explorer program; you might check the information available at the URL:
http://support.microsoft.com/default.aspx?scid=kb;en-us;308090
Another possible explanation is that an Anti Virus product is involved; if the 'scan' of the archive is not completed when the browser 'passes' the file to WinZip, the result is a 'blank' WinZip window. I'd suggest temporarily disabling or reconfiguring your Anti virus software to avoid the behaviour.
Regards, Andreas
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php