From: php-bugs at spuetz dot ath dot cx
Operating system: Linux 64bit
PHP version: 5.2.1
PHP Bug Type: Zip Related
Bug description: ZipArchive doesn't open zip files containing high number of
files
Description:
------------
If a zip file contains more than 8xx files, ZipArchive::open returns
ZIPARCHIVE::ER_READ. It's working under 32bit, but failling under 64bit
systems (I tried two amd 64 systems).
5.2.1 and php5.2-200703201930 doesn't work.
Is this really a php issue?
Reproduce code:
---------------
#!/bin/sh
rm -rf test1 test2 test1.zip test2.zip
mkdir test1 test2
cd test1
php -r 'for ($i = 1; $i < 800; $i++) system("touch test$i.txt");'
cd ../
zip -r test1.zip test1 > /dev/null
php -r '$zip = new ZipArchive(); var_dump($zip->open("test1.zip"));
var_dump($zip->numFiles);'
cd test2
php -r 'for ($i = 1; $i < 876; $i++) system("touch test$i.txt");'
cd ../
zip -r test2.zip test2 > /dev/null
php -r '$zip = new ZipArchive(); var_dump($zip->open("test2.zip"));
var_dump($zip->numFiles);'
Expected result:
----------------
[EMAIL PROTECTED] zip]$ sh ./zip.sh
bool(true)
int(800)
bool(true)
int(876)
Actual result:
--------------
[EMAIL PROTECTED] zip]$ sh ./zip.sh
bool(true)
int(800)
int(5)
int(0)
--
Edit bug report at http://bugs.php.net/?id=40873&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40873&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40873&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40873&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40873&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40873&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40873&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40873&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40873&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40873&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40873&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40873&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40873&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40873&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40873&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40873&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40873&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40873&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40873&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40873&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40873&r=mysqlcfg