|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56267 ZIP package reading bug
Submitted: 2005-01-16 04:52 UTC Modified: 2006-03-14 05:51 UTC
From: bolk at hitv dot ru Assigned: pajoye (profile)
Status: Closed Package: zip (PECL)
PHP Version: 5.0.3 OS: Linux RedHat9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 - 18 = ?
Subscribe to this entry?

 [2005-01-16 04:52 UTC] bolk at hitv dot ru
I've compiled ZIP package as shared module. Package walk through the entire archive but doesn't read entry content.

Reproduce code:
$zip = zip_open($_FILES['file']['tmp_name']);
if ($zip)
    while ($zip_entry = zip_read($zip))
        $txt = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));

        echo $txt;

Expected result:
variable $txt is empty

Actual result:
file content in $txt


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-16 04:58 UTC] bolk at hitv dot ru
Oops... Please trade places 'actual' and 'expected' results.
 [2005-01-17 07:46 UTC]
Please report there:

 [2005-01-17 08:09 UTC] helgi at trance dot is
moved to zip package
 [2005-10-23 09:57 UTC]
Please try the latest package version and report back if you're still experiencing this issue.
 [2006-02-26 12:39 UTC] pierre dot php at gmail dot com
Please put the zip archive somewhere online and copy the link here.
 [2006-02-27 02:58 UTC] bolk at hitv dot ru
Go to this page:

and wait for 5 seconds
 [2006-02-27 11:24 UTC] pierre dot php at gmail dot com
If you like to have a preview of the next release, you can use the cvs version of the zip extension. It is available in the pecl cvs.

The fopen.php or extract.php examples does what you want.

The procedural API will be added this week with a new release.

Let me know if it fixes your problem.
 [2006-03-14 05:51 UTC] bolk at hitv dot ru
It works fine in new version of ZIP package.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 12:01:29 2024 UTC