|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40278 Added files are corruped.
Submitted: 2007-01-29 20:42 UTC Modified: 2007-01-29 21:58 UTC
From: ssites at nanlucian dot com Assigned:
Status: Closed Package: Zip Related
PHP Version: 5.2.0 OS: Windows XP SP2
Private report: No CVE-ID: None
 [2007-01-29 20:42 UTC] ssites at nanlucian dot com
I create the archive but when I open it, the file(s) is (are) corrupted.
With path or without path (at the first parameter), the file(s) is corrupted.

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

Expected result:
I expect to open and extract the file(s) successfully.

Actual result:
The file(s) from created archive is (are) corrupted.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 20:52 UTC]
Please try using this CVS snapshot:
For Windows:

 [2007-01-29 21:58 UTC] ssites at nanlucian dot com
10X. It's working with the latest version.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jun 05 17:03:35 2023 UTC