|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-03-15 14:09 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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.