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 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.
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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Mar 29 14:01:28 2024 UTC