PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » File_Archive » Bug #6387

Unable to open zip files created on a PC

Details

Submitted2006-01-01 23:18 UTC
Fromkelvins at kelhome dot dyndns dot org
Assignedcbrunet
StatusClosed
PackageFile_Archive
PHP Version4.3.6
OSFedora Core 3
Roadmaps(Not assigned)

Comments

[2006-01-01 23:18 UTC] kelvins at kelhome dot dyndns dot org

Description:
------------
Using version 1.5.3. If I use winzip on PC platform and create an archive, then try and open it on linux platform, I get a "No directory tcf.zip/ in inner reader". The zip file is there and the permissions are correct. I can use zip and unzip -l from the command line and it works perfectly. If I unzip the package with unzip, the zip it again (while leaving in the same location) it works fine. Does not work even if I use absolute file paths.

The first few bytes of a good zip file PKxxx, and a bad zip file starts with PK00PKxxx (where xxx is other data). You can download the zip file from: http://kelhome.dyndns.org/tcf.zip

Test script:
---------------
<?php
require_once "File/Archive.php";

// This opens a file (Archive or not) for reading.
$source = File_Archive::read("./tcf.zip/");

if (PEAR::isError($source))
echo $source->getMessage();

// Starts recursing through file
while ($source->next() ) {

// List files from archive

echo "Processing file...".$source->getFilename()."<BR>";
*/
}

?

Expected result:
----------------
Should be able to read archive file

Actual result:
--------------
As explained in the description