Summary | Download big folders as zip |
Queue | IMP |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) , slusarz (at) horde (dot) org |
Requester | valerio (at) dei (dot) unipd (dot) it |
Created | 03/18/2009 (5904 days ago) |
Due | |
Updated | 07/14/2009 (5786 days ago) |
Assigned | 06/28/2009 (5802 days ago) |
Resolved | 07/14/2009 (5786 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
Version ⇒ Git master
complete) when I stumbled on this nice piece of software
http://www.phpconcept.net/pclzip/index.en.php
Even Joomla uses it.
streams, so it is of little value.
I have added stream support to Horde_Compress_Zip, and IMP 5.0 uses
these streams to download the data. It uses PHP's temp streams, so it
will not use more than 2 MB of memory.
Assigned to
State ⇒ Assigned
New Attachment: patch_with_PclZip.patch
complete) when I stumbled on this nice piece of software
http://www.phpconcept.net/pclzip/index.en.php
Even Joomla uses it.
So, I rewrote a patch which use the last PclZip(2.8) copied in lib/PclZip.php
and some tricks to get the correct file name inside the archive.
Prerequisite: none (all inside the patch)
PEAR package. Installation is another notch harder. I'm happy to use
it if it's available, but we should not require it.
ZipArchive is not installed. There's no problem with using ZipArchive
if available with a fallback. Just can't require the existence of the
extension.
it's *"Zip PECL extension"*
ZipArchive is the name of the main class.
Not be confused with ZipArchive Library (full version is commercial)
php-pecl-zip is available in RPM, deb , ecc.
PEAR package. Installation is another notch harder. I'm happy to use
it if it's available, but we should not require it.
memory, compress it and write it.
Obviously this doesn't help.
I will investigate if I can: read a chunk, compress it and
progressively add to the zip file.
BTW
Excerpt from http://www.horde.org/horde/docs/?f=INSTALL.html
pear install -o Log Mail Mail_Mime DB Date File
pear -d preferred_state=beta install -a Services_Weather
So, what's the problem in including one more (useful) package?
Patch ⇒ No
module installed.
New Attachment: folders_Folder[1].patch
framework before writing the patch).
Until Horde4 with ZipStream is ready I will be happy using tmp files.
!important!
A collegue notice that old PHP versions have a memory leak in fpassthrough()
that should be replaced with:
while(!feof($mbfile)) {
echo fread($mbfile, 4096);
ob_flush();
}
Attached patch solves this issue and (maybe) is faster.
State ⇒ Feedback
Bug: 7814) for using a stream for zipdownloading. That should probably be made a framework ticket to be
implemented in Horde_Compress and would probably make sense here as
well.
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Download big folders as zip
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: folders_Folder.patch
State ⇒ New
When requesting a ZIP of one "big" mailbox (or many small) PHP may
exceed max memory limit.
The attached patch uses tempnam() and is based on Ross Becker work:
http://lists.horde.org/archives/imp/Week-of-Mon-20040906/039136.html
Prerequisite: ZipArchive pecl extension
Todo: tmpdir should change with OS default (now is "/tmp") but tempnam
behaviour is different between php version and OS.