|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47274 Zipfile get corrupted.
Submitted: 2009-02-02 10:36 UTC Modified: 2009-02-02 10:42 UTC
From: wolfgang dot forstmeier at gmail dot com Assigned: pajoye (profile)
Status: Not a bug Package: Zip Related
PHP Version: 5.2.8 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: wolfgang dot forstmeier at gmail dot com
New email:
PHP Version: OS:


 [2009-02-02 10:36 UTC] wolfgang dot forstmeier at gmail dot com
As described in Bug # 39506 Zip packaged generated through Apache get damaged. Creating Zip packages on CLI does work proper.

This bug seems to be introduced within 5.2.8, 5.2.6 is also working proper.

Reproduce code:
$zip = new ZipArchive;
$res = $zip->open( '', ZipArchive::CREATE );
if ($res === TRUE) {
   $zip->addFile( 'TestDoc1.txt', 'entryname1.txt' );
   echo 'ok';
} else {
   echo 'failed';

Expected result:
Readable Zip Archive

Actual result:
Zip Archive could not be read with WinZip.
Zip file is currently larger created with Apache than with CLI.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-02 10:42 UTC]
Duplicated, see #46985

Already fixed.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 13:01:47 2020 UTC