|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-29 11:07 UTC] vadim at vadiaz dot com
[2008-08-07 23:43 UTC] pajoye@php.net
[2008-08-08 00:31 UTC] florian dot ember at gmail dot com
[2008-08-18 07:35 UTC] pajoye@php.net
[2008-08-26 01:00 UTC] php-bugs at lists dot php dot net
[2009-03-04 10:32 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 18:00:01 2025 UTC |
Description: ------------ Opening archives with more than 1300 or so files fails with ER_READ. I encountered this while using the close/reopen method to avoid using up all available filehandles. On a Windows box the script below runs without errors. Reproduce code: --------------- <?php $za = new ZipArchive; $za->open('./useless.zip', ZipArchive::CREATE); for ($i = 1; $i <= 2000; ++$i) { $file = "$i.txt"; touch($file); if (!$za->addFile("./$file", $file)) { exit("Couldn't add $file"); } echo "Added $file<br />\n"; if ($za->numFiles % 100 == 0) { $za->close(); $res = $za->open('./useless.zip', ZipArchive::CREATE); if ($res !== true) { exit("Close/reopen: Error #$res @ $i"); } echo "Close/reopen @ $i<br />\n"; } } unlink('./useless.zip'); echo 'Done.'; Expected result: ---------------- Added 1.txt Added 2.txt [...] Added 2000.txt Done. Actual result: -------------- Added 1.txt Added 2.txt [...] Added 1299.txt Close/reopen: Error #5 @ 1300