ID: 48084 Updated by: paj...@php.net Reported By: darrenkarstens at googlemail dot com -Status: No Feedback +Status: Feedback Bug Type: Output Control Operating System: Windows XP PHP Version: 5.2.9 Assigned To: pajoye New Comment:
Can you upload the archive again and/or verify with a recent version? Previous Comments: ------------------------------------------------------------------------ [2009-05-05 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-04-27 10:47:13] darrenkarstens at googlemail dot com Here is a link to one of the files I tried http://65.75.249.187/sc_pop_2000.zip ------------------------------------------------------------------------ [2009-04-27 08:47:19] paj...@php.net Please provide a link to the archive you use for this test. ------------------------------------------------------------------------ [2009-04-27 08:46:17] darrenkarstens at googlemail dot com Description: ------------ When using the ZipArchive::renameIndex function to rename the files in a zip archive the zip becomes corrupt. I have tried several different zip files and they all become corrupt. Reproduce code: --------------- $client='TEST'; $zip = new ZipArchive(); if ($zip->open($targetpath,ZIPARCHIVE::OVERWRITE)===true) { // prefix all of the files with the clients name for($i = 0; $i < $zip->numFiles; $i++) { $zip->renameIndex($i,$client.$zip->getNameIndex($i)); } if (!$zip->close()) echo 'Failed to rename zip'; }else echo'Failed to open zip'; Expected result: ---------------- This should open an existing zip archieve from the path $targetpath and prefix all of the filenames of its files with the word 'TEST'. Actual result: -------------- The files do appear to get renamed when I open the finished archieve however I am unable to extract the files from the zip because they are corrupt. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48084&edit=1