#46985 [Opn->Fbk]: ZIP can not produce valid archive

From: Date: Wed, 31 Dec 2008 21:21:34 +0000
Subject: #46985 [Opn->Fbk]: ZIP can not produce valid archive
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132460@lists.php.net to get a copy of this message
ID: 46985 Updated by: pajoye@php.net Reported By: killerbg at gmail dot com -Status: Open +Status: Feedback Bug Type: Zip Related Operating System: Windows XP Professional SP3 PHP Version: 5.2.8 -Assigned To: +Assigned To: pajoye New Comment: I can't reproduce it here (xp sp3 and vista/2k8). Please provide the file(s) (the minimum required to create a corrupted archive) and the script you are using. Previous Comments: ------------------------------------------------------------------------ [2008-12-31 20:27:12] killerbg at gmail dot com Description: ------------ On Windows XP Professional Service Pack 3 with Apache 2.2.11 and PHP 5.2.8 - PHP 5.2.9 loaded as dynamic module when creating archive and adding files and/or folders the ouput is incorrect and the file gets corrupted. Even trying to open it again with the script results error code 19. Reproduce code: --------------- $file = tempnam("/tmp/", "php"); $zip = new ZipArchive(); if (($zip->open($file, ZipArchive::OVERWRITE)) === TRUE) { $zip->addEmptyDir("Directory"); $zip->addFile("File"); $zip->close(); } Expected result: ---------------- Correctly created zip archive file with unique name located in the temporaly directory. Actual result: -------------- Only the firsts few added files visible but corrupted acording to the crc32 record. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46985&edit=1

« previous php.bugs (#132460) next »