ID: 48763 Updated by: [email protected] Reported By: dani dot church at gmail dot com -Status: Closed +Status: Assigned Bug Type: Zip Related Operating System: CentOS 5 PHP Version: 5.2CVS-2009-07-01 (snap) Assigned To: pajoye New Comment:
reopen and assign to me. Previous Comments: ------------------------------------------------------------------------ [2009-11-05 12:13:24] [email protected] Fixed in latest releases too. ------------------------------------------------------------------------ [2009-11-05 12:12:26] [email protected] This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2009-11-05 11:31:50] levelak at post dot cz This bug does not only affect OpenOffice, but also WinRar (I have version 3.80 under Windows). The bug happens whenever a file with more than 255 chars is added via addFromString... eg.: $zip->addFromString("test.txt","asdjdjfdlksjdaf"); //OK $zip->addFromString("test2.txt",str_repeat("A",256); //Corrupt archive The issue is resolved by upgrading to 5.2.11, on 5.2.6 it also works with no problems. ------------------------------------------------------------------------ [2009-07-19 16:37:42] [email protected] Thanks for your patch! I have applied it to all branches and pecl. A pecl release will be done next week. Please note that the patch has been applied upstream as well (libzip repo). I will close the bug once the test is there too. ------------------------------------------------------------------------ [2009-07-04 14:37:24] dani dot church at gmail dot com RalfBecker: In fact, one probable workaround, until this bug gets fixed, is to iterate through EVERY file in the ZipArchive, get the contents, and addFromString to put them back into the archive. By overwriting every single file in the archive (with its own contents), you won't trigger the bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/48763 -- Edit this bug report at http://bugs.php.net/?id=48763&edit=1
