Quote from: Chuck at Oct 30, 2008, 12:18 PM
...
The Archive Tool is designed to handle all files types. For example you could upload a pdf, txt or html file and download it later. Your fix will break the ability to download those type of files and may cause the browser to display known file types instead.
...
I understand that. But the modified function is for ZIP archive (
function archiveFrameZip()).
And even if it’s a PDF, I just right click and select Download target file.
But sorry that’s not the point.
Do you have specific errors from your web server logs you can share?
After a little search, here is what I’ve found in the
apache web log (there is nothing in the apache error log) :
(note that I’ve replaced some of the site name by "My-Site", "My Host", ect...)
Line 1564 : MyHost.net www.my-site.fr - [29/Oct/2008:14:06:25 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 39452672 "http://www.my-site.fr/backup/index.php?nav=af" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)"
Line 1829 : MyHost.net www.my-site.fr - [29/Oct/2008:14:25:00 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 37789696 "http://www.my-site.fr/backup/index_.php?nav=af" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)"
Line 3004 : MyHost.net www.my-site.fr - [29/Oct/2008:17:45:30 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 38420480 "http://www.my-site.fr/backup/index_.php?nav=af" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)"
Line 3108 : MyHost.net www.my-site.fr - [29/Oct/2008:17:51:48 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 42336256 "http://www.my-site.fr/backup/index_.php?nav=af" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Line 3112 : MyHost.net www.my-site.fr - [29/Oct/2008:17:59:27 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 15106048 "http://www.my-site.fr/backup/index_.php?nav=af" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Line 3113 : MyHost.net www.my-site.fr - [29/Oct/2008:17:59:47 +0100] "GET /backup/index.php?nav=afd&file=/homez.49/login/www/MySite/v2/backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 8282112 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Line 3120 : MyHost.net www.my-site.fr - [29/Oct/2008:17:59:56 +0100] "GET /backup/archive/adeis_bkup_20081029_140252.zip HTTP/1.1" 200 75366928 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
Well, we easely see that I’ve tried multiple times to download the file with various web browser (Firefox 3 and IE7). With the GET method by php header, the server answer around
39452672 bytes (~40mb), this is a wrong file size ! That’s why the download end dramatically around 50%.
But when I download the file directly (see the last line), the lenght is
75366928 bytes (~76mb), wich is correct ! (and the download works).
So maybe the php headers send a wrong file size ... I’m not sure about that, because I’ve tried to
echo() the
$file[’size_bytes’] variable in the function
archiveFrameDnld() (with the php header) and the size seems to be correct !
I hope it could help you ...
(oh, and sorry if my english is ... a little weird).