From: wolfgang dot forstmeier at gmail dot com Operating system: Windows XP PHP version: 5.2.8 PHP Bug Type: Zip Related Bug description: Zipfile get corrupted.
Description: ------------ As described in Bug # 39506 Zip packaged generated through Apache get damaged. Creating Zip packages on CLI does work proper. This bug seems to be introduced within 5.2.8, 5.2.6 is also working proper. Reproduce code: --------------- <?php $zip = new ZipArchive; $res = $zip->open( 'test.zip', ZipArchive::CREATE ); if ($res === TRUE) { $zip->addFile( 'TestDoc1.txt', 'entryname1.txt' ); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Expected result: ---------------- Readable Zip Archive Actual result: -------------- Zip Archive could not be read with WinZip. Zip file is currently larger created with Apache than with CLI. -- Edit bug report at http://bugs.php.net/?id=47274&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47274&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47274&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47274&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47274&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47274&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47274&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47274&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47274&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47274&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47274&r=support Expected behavior: http://bugs.php.net/fix.php?id=47274&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47274&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47274&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47274&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47274&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47274&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47274&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47274&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47274&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47274&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47274&r=mysqlcfg