|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39714 Files which ate stored in a SubFolder within the archive are not accessible
Submitted: 2006-12-02 16:39 UTC Modified: 2006-12-04 12:36 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: d dot ratz at gmx dot net Assigned: pierre (profile)
Status: Closed Package: Zip Related
PHP Version: 5.2.0 OS: Windows XP SP2
Private report: No CVE-ID: None
 [2006-12-02 16:39 UTC] d dot ratz at gmx dot net
After creating a Zip-File including subfolders in it, the Structure can not be read with Windows' own Utility (ZIP-compressed Folder - not sure if this is translated correct). All Files that should appear in Subfolder are not shown at all. 

With WinZip or WinRAR everything is OK. I checked also with System.IO.Packaging API and this Engine is also not able to read the Archive.

I used the updated php_zip.dll from php5.2-win32-latest as mentioned in Bug-Report 39506.

Reproduce code:
$zip = new ZipArchive;
$res = $zip->open('', ZipArchive::CREATE);
if ($res === TRUE) {
	$zip->addFile('file1.txt', 'file1.txt');
	$zip->addFile('file2.txt', '/sub/file2.txt');

Expected result:
Zip-File with structure


Actual result:
Structure in Windows-Tool and System.IO.Packaging API


Structure in WinZip / WinRar



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-02 17:48 UTC]
Please try using this CVS snapshot:
For Windows:

Please provide a script without external data, or with file1.txt and file2.txt (link to).

Also try with a recent version (snapshots or from pecl).
 [2006-12-04 12:32 UTC] d dot ratz at gmx dot net
Tried latest Version from snapshot Built On Dec 04, 2006 07:30 GMT and this works
 [2006-12-04 12:36 UTC]
Works -> closed.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 19:03:45 2022 UTC