Bug #59118 [NoF->Csd]: Can not open more than 65535 entries
| From: | cmb@php.net | Date: | Thu, 26 Oct 2017 13:13:15 +0000 |
| Subject: | Bug #59118 [NoF->Csd]: Can not open more than 65535 entries | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212330@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=59118&edit=1
ID: 59118
Updated by: cmb@php.net
Reported by: niculaantoniu at yahoo dot com
Summary: Can not open more than 65535 entries
-Status: No Feedback
+Status: Closed
Type: Bug
Package: Zip Related
Operating System: windows XP
PHP Version: 5.2.0
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks for the info, Marco!
Since PHP 7.0.25 already requires at least libzip 0.11[1], this
ticket can be closed.
[1] <https://github.com/php/php-src/blob/PHP-7.0.25/ext/zip/config.m4#L66-L73>
Previous Comments:
------------------------------------------------------------------------
[2017-10-26 12:47:28] marco dot clemencic at gmail dot com
For reference, I stumbled on this bug using PHP 5.3.3 (on a system equivalent to RedHat 6).
I found out that the problem was solved by the upgrade of libzip to 0.10, see https://libzip.org/news/release-0.10.html
Cheers
Marco
------------------------------------------------------------------------
[2015-05-17 04:22:20] 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.
------------------------------------------------------------------------
[2015-05-05 23:46:02] cmb@php.net
I can neither reproduce this issue with PHP 5.5.24 nor 5.6.8 (nor
even 5.4.19) with the following augmented script:
<?php
$zip = new ZipArchive();
$zip->open(
'59118.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE
);
for ($i = 0; $i < 70000; $i++) {
$zip->addFromString("$i.txt", 'foo');
}
$zip->close();
$zip = new ZipArchive();
$zip->open('59118.zip', ZIPARCHIVE::CHECKCONS);
for ($i = 0 ; $i < 70000; $i++){
echo $i . " ";
print_r($zip->statIndex($i));
}
$zip->close();
?>
Do you still experience this issue with current PHP versions? If
so, we'd need further details, ideally a copy of an archive that
shows the behavior.
------------------------------------------------------------------------
[2010-03-19 15:04:12] niculaantoniu at yahoo dot com
"The original ZIP format had a 4GB limit on various things
(uncompressed size of a file, compressed size of a file and
total size of the archive), as well as a limit of 65535
entries in a zip archive. In version 4.5 of the
specification (which is not the same as v4.5 of any
particular tool), PKWARE introduced the "ZIP64" format
extensions to get around these limitations. Zip64 support is
emerging. For example, the File Explorer in Windows XP does
not support ZIP64, but the Explorer in Windows Vista does.
Likewisesome libraries, such as DotNetZip and
IO::Compress::Zip in Perl, support ZIP64, while others, such
as Java's built-in java.util.zip, still lack it."
http://en.wikipedia.org/wiki/ZIP_file_format#ZIP64
------------------------------------------------------------------------
[2010-03-15 14:09:11] niculaantoniu at yahoo dot com
Description:
------------
I have an archive with more than 65535 entries.
The ZipArchive and the zip functions can process only 65535
entries
Reproduce code:
---------------
$zip = new ZipArchive();
$zip->open($cwd."/thezip.zip", ZIPARCHIVE::CHECKCONS);
for ($idx = 0 ; $idx<70000; $idx++){
echo "<br>".$idx." ";
print_r($zip->statIndex($idx));
//echo $zip->getFromIndex($idx);
}
Expected result:
----------------
70000 entries statistics
Actual result:
--------------
i will show echo 70000 lines but the last
with stat info is the 65534 line
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=59118&edit=1