php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ssites at nanlucian dot com
New email:
PHP Version: OS:

 

 [2007-01-29 20:42 UTC] ssites at nanlucian dot com
Description:
------------
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:
---------------
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip', ZipArchive::CREATE);
if ($res === TRUE) {
   $zip->addFile('Untitled-1.jpg', 'Untitled-1.jpg');
   $zip->close();
   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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 20:52 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-01-29 21:58 UTC] ssites at nanlucian dot com
10X. It's working with the latest version.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC