php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59833 $zip->numFiles == 0 ?!
Submitted: 2011-06-29 04:34 UTC Modified: 2015-05-17 04:22 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: hi dot laowang at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Zip Related
PHP Version: 5.3.6 OS: centos
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-06-29 04:34 UTC] hi dot laowang at gmail dot com
Description:
------------
I use ZipArchive to process a Android APK file (also ZIP), But numFiles == 0 !!

Reproduce code:
---------------
$zip = new ZipArchive();
$zip->open('a_zip_file');

echo $zip->numFiles



zip file path: http://apk.imobile.com.cn/detail.php?a=download&apk_id=915&from=api

Expected result:
----------------
$zip->numFiles > 0 !

Actual result:
--------------
$zip->numFiles == 0 !

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-18 19:22 UTC] at php dot net
Do you have something smaller to reproduce your problem? Or 
does it happen only with this archive?
 [2012-03-06 12:42 UTC] pajoye@php.net
test
 [2012-03-06 12:43 UTC] pajoye@php.net
test
 [2012-03-06 12:45 UTC] pajoye@php.net
test
 [2012-03-06 15:39 UTC] pajoye@php.net
test
 [2012-03-06 15:40 UTC] pajoye@php.net
test
 [2012-03-06 15:54 UTC] pajoye@php.net
test
 [2012-03-07 16:04 UTC] pajoye@php.net
t
 [2012-03-21 07:35 UTC] pajoye@php.net
test new comment.
 [2012-03-21 07:36 UTC] pajoye@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2012-03-21 07:48 UTC] pajoye@php.net
test
 [2012-03-22 16:19 UTC] pajoye@php.net
t
 [2015-04-16 12:50 UTC] cmb@php.net
-Package: zip +Package: Zip Related
 [2015-05-05 22:31 UTC] cmb@php.net
-Status: Assigned +Status: Feedback -Assigned To: pajoye +Assigned To: cmb
 [2015-05-05 22:31 UTC] cmb@php.net
I can't reproduce the issue with the test archive. PHP 5.4.19,
5.5.24 and 5.6.8 correctly report 14 files.

Apparently, the problem has been fixed in the meantime. Can you
please try a newer PHP version, hi.laowang?
 [2015-05-17 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 19 07:01:23 2020 UTC