forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: nerovik on January 03, 2008, 08:57:16 pm

Title: Downloading a Zip : file is corrupted
Post by: nerovik on January 03, 2008, 08:57:16 pm
Good evening,

I have spent a lot of time with Frantz (french forum) to find out a solution. I have also looked through the entire forum for a solution. I feel desperate.
My problem is the following : I select one picture and click Add to Favorites. Then I click on My favorites and click dowload as Zip file. The pictures.zip cannot be uncompressed. 7-zip (or whatever) says that the header file is corrupted.

It works perfectly on a public website (http://liminaires.free.fr) but it does not work at home nor at my office.

My local Web server is Wamp 2.0 - PHP Version 5.2.5
Windows Vista
IE7 or Firefox (latest versions)
Php-zip.dll is activated.
Phpinfo is attached

We have already compared our configurations with Frantz (French forum). I can reproduce this problem on several different PCs  (windows XP) at my office.

I cannot find out how I can solve this problem and it is very (very) urgent for me to solve it. The aim is to present a photo gallery at my office (Xampp server - virtual machine).
I can only give access to my PC at home. Let me know if you can help me. Thanks in advance.


Title: Re: Downloading a Zip : file is corrupted
Post by: Nibbler on January 03, 2008, 09:24:04 pm
Post an example of the corrupted zip file.
Title: Re: Downloading a Zip : file is corrupted
Post by: nerovik on January 03, 2008, 10:27:06 pm
Please find enclosed pictures.zip.
Thanks for your prompt reply.
Title: Re: Downloading a Zip : file is corrupted
Post by: Nibbler on January 03, 2008, 10:39:29 pm
There's some strange characters at the start of the file. It's not whitespace. Perhaps a BOM or something. Does it work if you switch to english or change theme?
Title: Re: Downloading a Zip : file is corrupted
Post by: nerovik on January 03, 2008, 10:54:31 pm
That's right, the header of the zip file is corrupted.
It does not work either in english.
Just let you know that I have reinstalled (fresh install) coppermine => same problem
I have modified chaoticsoul template but same problem occur with classic theme.
PYAP (from the french forum) told me that it should come from my server (Wamp). But I also tried with Xampp (another server).
Title: Re: Downloading a Zip : file is corrupted
Post by: Nibbler on January 03, 2008, 11:28:40 pm
Try changing

Code: [Select]
$zip->download_file();

to

Code: [Select]
ob_end_clean();
$zip->download_file();

in include/archive.php
Title: Re: Downloading a Zip : file is corrupted
Post by: nerovik on January 03, 2008, 11:47:14 pm
$zip->download_file(); does not exist (?)
Title: Re: Downloading a Zip : file is corrupted
Post by: Nibbler on January 03, 2008, 11:48:15 pm
Sorry, I meant zipdownload.php
Title: Re: Downloading a Zip : file is corrupted
Post by: nerovik on January 03, 2008, 11:55:11 pm
You are fantastic! Thank you so much. Can you explain to me quickly ?
Title: Re: Downloading a Zip : file is corrupted
Post by: Nibbler on January 04, 2008, 12:06:05 am
It makes sure nothing is sent to the browser before the zip file begins.
Title: Re: Downloading a Zip : file is corrupted
Post by: Joachim Müller on January 04, 2008, 07:52:41 am
@Nibbler: should this go into the core as a precaution for others with similar issues?
Title: Re: Downloading a Zip : file is corrupted
Post by: Joachim Müller on January 04, 2008, 09:05:07 am
@Nibbler: ignore the above question - I just performed a checkout and noticed that you already added your code to the core both of cpg1.4.x as well as cpg1.5.x. Should have done this before posting my silly question, sorry.
Title: Downloading a Zip : file is corrupted - Bad News
Post by: nerovik on January 04, 2008, 01:48:21 pm

Problem reopened:
It works on Windows Vista (IE7/Firefox) but it still does not work on Windows XP (IE6).
Thanks for your help!
Title: Re: Downloading a Zip : file is corrupted
Post by: Joachim Müller on January 04, 2008, 02:59:36 pm
Merged you new thread with the existing one. Don't double post; there is a reason why solved threads don't get locked immediately: you can still reply to them if it seems like a solved issue needs to be looked into further.

I find it hard to believe though that this should be related to the client OS: after all, the zip file creation happens on the server, not on the client: how could a client OS possibly interfere then? Anyway, tested this on Windows XP Professional German SP2 with Firefox 2.0.0.11 and IE7.0.5730.11 on your site - both work as expected, the zip files are perfectly OK.
Title: Re: Downloading a Zip : file is corrupted
Post by: nerovik on January 04, 2008, 06:07:40 pm
I confirm  : Internet Explorer 6 seems to be my source of annoyance!
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on March 07, 2008, 07:41:46 pm
I was having this same problem and I did what nibbler suggested. and now I get this problem

!   C:\Documents and Settings\alans\Desktop\pictures.zip: The archive is either in unknown format or damaged


any suggestions?
Title: Re: Downloading a Zip : file is corrupted
Post by: Sami on March 07, 2008, 11:04:01 pm
- Attach that file to this thread
- Post a link to your gallery
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on March 08, 2008, 01:08:49 am
my gallery - http://ad6storieshigh.com/gallery/

thanks
Title: Re: Downloading a Zip : file is corrupted
Post by: Sami on March 08, 2008, 06:03:42 am
Zip File is fine !!!
Also I downloaded same file my self and it's fine too!
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on March 08, 2008, 06:21:24 am
Ya I guess you're right, that one does work. I just downloaded another one with 6 files and got a corrupted error again.


here it is http://www.ad6storieshigh.com/uberdownloads/personal/pictures(3).zip
500kb limit on the attachments. hope that helps.
Title: Re: Downloading a Zip : file is corrupted
Post by: Sami on March 08, 2008, 07:20:25 am
Ok it complain about end of file !
try to re-download the file.
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on March 08, 2008, 07:38:28 am
well...weird, it works. thanks, hmmmmm interesting.
Title: Re: Downloading a Zip : file is corrupted
Post by: Joachim Müller on March 08, 2008, 08:47:21 pm
Works as expected for me: i added 6 random pics to my favorites and was able to download them just fine. The archive is intact.
You might be running into limitations on your client.
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on March 08, 2008, 08:50:23 pm
Yup I guess that's what was happening. Thanks for helping me I'm glad it's all working.
Title: Re: Downloading a Zip : file is corrupted
Post by: pressurecooker on April 14, 2008, 11:48:20 am
I too have the same problem. The Zip file is corrupted and I can even tell you why. The zip file starts with some kind of crazy <iframe> instead of having a PK in the first line. The bottom of the zip is also looking strange. I already had ob_end_clean(); before the $zip command, so this solution is not working for me.

The only two files that contain this <iframe> are the Fullsize Access plugin, which I already deleted because it didn't work on Microsoft server and the Lightbox plugin, which I cannot delete because I need it.

Could you kindly look into the attachment!
Thanks
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on April 14, 2008, 03:43:58 pm
For me the only plugins I have installed are jupload. so maybe there's another file that contains that. I'm not sure really, you sound better qualified to deduce what that means
Title: Re: Downloading a Zip : file is corrupted
Post by: Hein Traag on April 14, 2008, 04:55:46 pm
aldog, upgrade asap.

<!--Coppermine Photo Gallery 1.4.13 modpack v2 (stable)--> is not safe anymore. Version 1.4.18 is the latest stable.

Hein
Title: Re: Downloading a Zip : file is corrupted
Post by: aldog on April 14, 2008, 05:37:56 pm
whaoo. thanks for the heads up, I haven't been paying attention at all.