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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 15:01:32 2024 UTC