ZipArchive doesnt work for large files
| From: | Darren Karstens | Date: | Tue, 05 May 2009 09:21:02 +0000 |
| Subject: | ZipArchive doesnt work for large files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-292260@lists.php.net to get a copy of this message | ||
Hi,
I am having problems using any of the ZipArchive functions for files
above a certain size. For example creating a new zip and adding 1 file
works fine for files that are only a few kb, but when I tried a
slightly large one (about 60k) the zip became corrupt. Here is the
code im using:
$zip = new ZipArchive();
$zip->open('c:/uploads/test.zip',ZipArchive::CREATE);
$zip->addFile('c:/uploads/uk_natural.shp','uk_natural.shp');
$zip->close();
This creates the zip archive but when I try and extract the file I get
the error: "C:\uploads\test.zip: CRC failed in uk_natural.shp. The
file is corrupt". Does anyone know why this is being corrupted?