Downloaded ZIP are always corrupted Downloaded ZIP are always corrupted
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Downloaded ZIP are always corrupted

Started by demix, April 17, 2005, 06:08:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

demix

Hi. First of all, sorry for my bad english.

This is my problem: when I download the zip from "My Bookmark" (zipdownload.php) the server send me a corrupted zip.
I cannot open it with unzip, file-roller, WinZip, WinRAR and Windows XP Native Zip utility.
I make the following tests:

1) I add this line in zipdownload.php
$zip->filewrite(/tmp/file_generated.zip)
and I tested this generated file: it is corrupted in the server (not during the transfer).

2) The Tar compression works well: if I change zipdownload.php
$zip = new zipfile($cwd,$flags);
in
$zip = new tarfile($cwd,$flags);
the tar archive downloaded is ok. But Windows users bugs me that they don't know how to extract tar files :( So I would like zip compression to work.

3) I made an archive with only one file (safran.jpg) that is present in Coppermine Online Demo to HEX compare the corrupted generated zip with the correct zip generated from Official Coppermine online demo. The files are totally different. I attach to this post the two files. I downloaded correct.zip from Official Coppermine site, corrupt.zip from my site.

4) zlib of corse is installed.

The server configuration is:

SuSE Linux 8.2
Coppermine 1.3.2
zlib-1.1.4-105
php-4.3.1-52
apache-1.3.27-82

I have the same problem with another server:

SuSE Linux 9.1
Coppermine 1.3.2
php4-zlib-4.3.9-0.1
zlib-1.2.1-70.6
php-4.3.9-0.1
apache-2.0.52-5.1

If someone needs it, I can give the URL of the site, and a free shell account to the server to see php source files.

Thanks in advance.

Palma Demis

demix.cpp

I finally solved by myself.

In /etc/php.ini I changed the value

mbstring.func_overload = 7
in
mbstring.func_overload = 0

Now it works fine.

kegobeer

Thanks for reporting your fix.  This is one of the few issues the devs didn't have an answer for.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Pharkie

I have exactly the same problem, and changing mbstring.func_overload doesn't help - I've tried it both 0 and 7, in php.ini and just on the relevant site.

Are there any other clues to what's going wrong with the ZIP download? Every one it creates is unopenable, saying it's 'invalid or corrupted'.

I tried replacing zipdownload.php in my CPG 1.3.2 with the version 1.5. from CPG 1.3.3, but that makes no difference. I don't want to upgrade everything to 1.3.3 if it's not going to fix the problem?

What do people think - is there a simple (probably PHP config related) answer to this issue with the ZIP file?

Pharkie

Got it!  ::)

In the CPG web-admin config I needed to change 'English-UTF-8' to just 'English'.

I now realise this also prevented xp_publish.php from working, a problem I hadn't resolved previously. i.e. the download .reg file was generated properly, but wouldn't go into the registry despite looking exactly the same in a text editor to one that did.

I suspect in 'UTF-8' mode, CPG is adding stuff into headers or generating ASCII parts that stop the downloaded ZIP or REG from working.

Note you can't just copy 'english-utf-8.php' to 'english.php' in the lang files, which I wanted to do to quickly keep my text changes. you need to re-make the changes to english.php. The utf-8 file must actually have utf-8 characters in it, which means you're best starting from the clean 'english.php'. I managed to speed this up using Beyond Compare 2.

Hope this helps someone!  ;D

yay my CPG is working again =:)!

Adam

Megachip

Quote from: demix.cpp on June 11, 2005, 01:02:03 PM
I finally solved by myself.

In /etc/php.ini I changed the value

mbstring.func_overload = 7
in
mbstring.func_overload = 0

Now it works fine.

That doesn't work for me, but deactivate mbstring module works.

henfri

Hi,
I'm experiencing the same Problems. As the site is hostet by a Provider, I can't access the  /etc/php.in.
Here's some Info about the environment:


System SunOS cadmium 5.9 Generic_112233-08 sun4u
Build Date Aug 12 2005 16:11:28
Configure Command './configure' '--with-ssl=/opt/rz/openssl-0.9.7d' '--with-ndbm' '--with-db' '--with-mysql' '--with-ftp' '--with-gettext' '--with-gd=/usr/local' '--with-zlib-dir=/usr/include' '--enable-safe-mode' '--enable-memory-limit' '--with-apxs=/opt/rz/apache-1.3.31/bin/apxs' '--prefix=/opt/rz/php-4.3.11'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /opt/rz/php-4.3.11/lib
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib

zlib
ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value


Any Ideas, what could be wrong?

Thanks a lot,
Hendrik