#40494 [Opn->Asn]: Memory problem with ZipArchive::addFile()

From: Date: Thu, 15 Feb 2007 10:28:52 +0000
Subject: #40494 [Opn->Asn]: Memory problem with ZipArchive::addFile()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108958@lists.php.net to get a copy of this message
ID: 40494 Updated by: tony2001@php.net Reported By: foster dot graeme at gmail dot com -Status: Open +Status: Assigned -Bug Type: Zip Related +Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.2.1 -Assigned To: +Assigned To: pajoye Previous Comments: ------------------------------------------------------------------------ [2007-02-15 10:22:25] foster dot graeme at gmail dot com Description: ------------ When adding files to an archive, (using successive ZipArchive::addFile() commands) the compression doesn't happen until the file is closed. This can result in an out of memory error, a temporary fix is to close the archive and then reopen it within the php code. An idea solution would be to compress the file when it is added, probably in function _zip_replace(), but I don't know what the implications of this would be. It would certainly require a rewrite of the ugly function zip_close(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40494&edit=1

« previous php.bugs (#108958) next »