ID: 47324 Updated by: paj...@php.net Reported By: kmteoh at hotmail dot com -Status: Open +Status: Feedback Bug Type: Zip Related Operating System: w2k PHP Version: 5.2.9RC1 -Assigned To: +Assigned To: pajoye New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-02-06 04:43:26] kmteoh at hotmail dot com Description: ------------ can't get the ziparchive to add files correctly. tried different version of php_zip.dll same thing happen, and it generates funny files. followed instructions in #46985, used php_zip.dll version 5.2.5.5, 5.2.8.8, 5.2.9.9 all not work. it only work in cli but not browser (isapi). it generates files like test.zip.b03252 and test.zip.a03252 for me instead of actual test.zip. i renamed to test.zip then tried to extract but crc error. Reproduce code: --------------- <?php $zip = new ZipArchive; if ($zip->open('test.zip') === TRUE) { $zip->addFile('index.txt', 'newname.txt'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Expected result: ---------------- should be able to open the test.zip with winzip or winrar easily Actual result: -------------- crc error. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47324&edit=1