祝你好运,Lars 解决方案 ***瑞典人escribió/写道(星期二,2005年2月15日21:16:18 +0100 ):现在有一段时间我一直有传输问题,即我的客户下载大型二进制(ZIP)文件经常损坏。 我建议您查看服务器的* .zip文件的MIME类型。 从我能够做到的一些事实发现它似乎有时会出现RR文件损坏的问题,具体取决于ZLIB的设置/编译。 你压缩了吗?飞行中的文件? - - +álvaroG。Vicario - 西班牙布尔戈斯 + - http://www.demogracia.com (la web de humor barnizada para la intemperie) ++ Manda tus dudas al grupo,no amibuzón - +发送你的问题到小组,而不是我的邮箱 - 你好Alvaro, Alvaro G. Vicario写道: ***瑞典人escribió/写(星期二) ,2005年2月15日21:16:18 +0100): 现在有一段时间我一直有转移问题,即我的客户下载大型二进制(ZIP)文件通常是损坏的。 我建议您检查服务器的MIME类型* .zip文件。 我已经尝试过,它被设置为一些非描述性的应用程序。 我把它改成了octet-stream。与* .exe一起使用和另一个 二进制文件,但它没有帮助。除了mime.types之外还有其他地方吗? 哪里可以改变这个? 我看过一些关于评论的简短评论标题是 获取class.download.inc中文件的mimetype,但我不知道 如何/在哪里做,如果它与我的问题。 从我能够发现的一些事实来看,似乎有时存在损坏的ZIP文件的问题,具体取决于设置/编译ZLIB。 你是否动态压缩文件? 不是故意的...它们已经是服务器磁盘上的ZIP。 感谢您的输入到目前为止,我认为您肯定是在正确的 路径!还有更好的想法吗? 祝你好运,Lars ***瑞典人escribió/写道(星期二,2005年2月15日21:52:39 +0100):我已经尝试过,它被设置为一些非描述性的应用程序。我把它改成了octet-stream。与* .exe一起使用和其他的二进制文件,但它没有帮助。除了mime.types之外还有更多地方吗?我可以改变这个地方吗? 我的建议只是因为服务器可能正在使用默认值输入 (通常是text / html)并且正在搞乱字符编码或者天知道 什么。 无论如何,既然你似乎是使用PHP脚本来提供文件,然后它是那个应该设置MIME类型的脚本的b / b ;否则你将获得默认类型。类似的东西应该做: header(''Content-Type:application / zip''); Internet Explorer已知因为PDF文件有问题(特别是如果你用使用会话)但是我不确定ZIP。 - - +álvaroG。Vicario - 西班牙布尔戈斯 + - http://www.demogracia.com (la web de humor barnizada para la intemperie) ++ Manda tus dudas al grupo,no amibzón - +将您的问题发送给小组,而不是发送到我的邮箱 - Hello,I am posting this rather lengthy description here in hope of getting atleast some insight into a problem that is really hurting my business,since I have come to the conclusion that my problem is at least partlyPHP-related.Some time now I have been having transfer problems, i.e. my customersdownloads of large binary (ZIP) files are often corrupt.A corrupted file now and then can of course never be avoided, but I getseveral complaints from customers every day. Of any specific file,approx. 1 out of 4 downloads (larger than 100kB or so) are affected.I have spent months trying to find the source of the problems withoutsuccess, but I have been able to rule out many possible causes. Here aresome facts:1) The actual files are OK on the server. Direct (unencrypted) links arefine, so it''s not a general problem.2) About 50% of the customers download (the exact same files) fromanother source. I don''t even get 1 complaint every two months from thosecustomers, while I get 1-3 complaints _every day_ from those whodownload from my server.3) The customers have various SW/HW/OS, so it''s very unlikely that it''sa user problem. Plus, the same customer often download from both places,but only have problems with the files from my server.4) I have shut down all scripts for a while, so that only a staticwebsite remained, but it didn''t help.5) I have had this problem on three servers: The present RaQ550, theprevious RaQ4 and the RaQ4 I had before that. So it''s highly unlikelythat it is server-related.6) I can easily reproduce the problem myself. As I looked into this Ifound a systematic error:Analyzing corrupt vs. clean ZIP file downloads with a binary/hex editorclearly shows that the error is systematic. Clean ZIP files have a lotof ''00h'' bytes in them. In ALL of the corrupt ZIP files ALL (well, most)of these bytes have been exchanged for ''5C30h'', i.e. TWO bytes ( 00h ->5C30h ) !Since ''5C30h'' equals an escaped zero, i.e. "\0", my guess is that thereis a translation error somewhere.So, what does PHP have to do with this? Well, my download links topurchaseware are encrypted by the PHP "ewportal": http://www.eliteweaver.co.uk/antifra....php?page=HomeFrom the few facts I have been able to uncover it seems there issometimes a problem with corrupted ZIP files depending on thesetting/compilation of ZLIB. If anyone on this forum have experiencedsimilar things I would very much appreciate if they could share.My servers PHP configuration is at: http://www.snith.com/phptest.phpBest regards, Lars 解决方案 *** Swede escribió/wrote (Tue, 15 Feb 2005 21:16:18 +0100): Some time now I have been having transfer problems, i.e. my customers downloads of large binary (ZIP) files are often corrupt.I suggest that you check the server''s MIME type for *.zip files. From the few facts I have been able to uncover it seems there is sometimes a problem with corrupted ZIP files depending on the setting/compilation of ZLIB.Do you compress the files on the fly?---+ álvaro G. Vicario - Burgos, Spain+- http://www.demogracia.com (la web de humor barnizada para la intemperie)++ Manda tus dudas al grupo, no a mi buzón-+ Send your questions to the group, not to my mailbox--Hello Alvaro,Alvaro G. Vicario wrote: *** Swede escribió/wrote (Tue, 15 Feb 2005 21:16:18 +0100):Some time now I have been having transfer problems, i.e. my customersdownloads of large binary (ZIP) files are often corrupt. I suggest that you check the server''s MIME type for *.zip files.I have already tried that, it was set to some non-descript application.I changed it to "octet-stream" together with "*.exe" and the otherbinaries, but it did not help. Is there any more place than "mime.types"where I could change this?I have seen some brief comments about "commenting out the header whichgets the mimetype of the file in class.download.inc", but I have no ideahow/where to do that, and if it is related to my problem. From the few facts I have been able to uncover it seems there issometimes a problem with corrupted ZIP files depending on thesetting/compilation of ZLIB. Do you compress the files on the fly?Not intentionally...they are already ZIPs on the server disk.Thanks for your input so far, I think you are definitely on the rightpath! Any more good ideas?Best regards, Lars*** Swede escribió/wrote (Tue, 15 Feb 2005 21:52:39 +0100): I have already tried that, it was set to some non-descript application. I changed it to "octet-stream" together with "*.exe" and the other binaries, but it did not help. Is there any more place than "mime.types" where I could change this?My suggestion only came because maybe the server was using the default type(usually text/html) and was messing with character encoding or God knowswhat.Anyway, since you seem to be using a PHP script to serve files then it''sthe script the one who should be setting the MIME type; otherwise you''llget the default type. Something similar to this should do:header(''Content-Type: application/zip'');Internet Explorer is known for having problems with PDF files (esp. if youuse sessions) but I''m not sure about ZIPs.---+ álvaro G. Vicario - Burgos, Spain+- http://www.demogracia.com (la web de humor barnizada para la intemperie)++ Manda tus dudas al grupo, no a mi buzón-+ Send your questions to the group, not to my mailbox-- 这篇关于通过PHP下载期间损坏的ZIP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-03 19:00