|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58595 php-zip can not produce a zip/ readable archive
Submitted: 2009-03-23 17:01 UTC Modified: 2009-07-20 15:23 UTC
From: wendy dot umarov at free dot fr Assigned:
Status: Closed Package: zip (PECL)
PHP Version: 5_2 CVS-2009-03-23 (dev) OS: Linux Mandriva 2009.0 and 2009.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: wendy dot umarov at free dot fr
New email:
PHP Version: OS:


 [2009-03-23 17:01 UTC] wendy dot umarov at free dot fr
The actual 1.8.10 php-zip extension create an unreadable zip file for application.

Reproduce code:

-> produce an unreadable document.

Sample at

Expected result:
A valid oasis document. 

Actual result:
unreadable oasis document via OpenOffice 3.0.0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-20 16:33 UTC] xsa at amstergroup dot com
I encounter same problem under Windows XP 32-Bit, with wampserver PHP-5.2.9-2, using following code (and previous exemple code do the same):

$zip = new ZipArchive();
$zip->open($outputfile, ZipArchive::CHECKCONS);
$zip->addFile($this->filename, 'content.xml');

If I copy original ODT file, store new content.xml file using 7Z by exemple to this copy, archive is not corrupted.

If I compare the properties of the content.xml in corrupted archive and in manual updated copy, compressed size of the corrupted file is less than the one obtained using manual method.  File checksum seems to be same ?
 [2009-05-20 17:28 UTC] xsa at amstergroup dot com
After some checks, this works fine in PHP 5.2.5, corrupt archive in PHP 5.2.8, and corrupt added file in PHP 5.2.9-2.

Concerning size difference in 7Z, they already exists in PHP 5.2.5 and CRC is same.

I will try to move dll file from 5.2.5 to 5.2.9-2, to see if mod_zip is the problem.
 [2009-05-21 05:59 UTC] xsa at amstergroup dot com
After test, it seems that using the php_zip.dll provided with php 5.2.5 in php 5.2.9-2 doesn't corrupt archive or files in archives.
 [2009-07-01 20:14 UTC] dani dot church at gmail dot com
This problem still exists in PHP 5.2CVS-2009-07-01.  I have opened a bug on the PHP bug tracker at:

Also, the zip extension from PHP 5.2.6 is not affected, so as a workaround, you can use that version of the extension.
 [2009-07-10 09:10 UTC] jesbuddy07 at hotmail dot com
how can i download the PHP_ZIP.dll from 5.2.6?
 i went to PECL site, they have version 1.8.10 and earlier, 
but when i download the package, there is no dll inside.
 [2009-07-20 15:23 UTC] pierre dot php at gmail dot com
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 20 06:03:34 2022 UTC