<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Download big folders as zip</title> 
  <pubDate>Thu, 09 Apr 2026 19:39:42 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8096</link> 
  <atom:link rel="self" type="application/rss+xml" title="Download big folders as zip" href="https://bugs.horde.org/ticket/8096/rss" /> 
  <description>Download big folders as zip</description> 
 
   
   
  <item> 
   <title>Problem:

When requesting a ZIP of one  &quot;big&quot; mailbox (or ma</title> 
   <description>Problem:

When requesting a ZIP of one  &quot;big&quot; 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 &quot;/tmp&quot;) but tempnam behaviour is different between php version and OS.</description> 
   <pubDate>Wed, 18 Mar 2009 12:45:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t53156</link> 
  </item> 
   
  <item> 
   <title>There is ticket for Ansel (Bug: 7814) for using a stream for</title> 
   <description>There is ticket for Ansel (Bug: 7814) for using a stream for zip downloading. That should probably be made a framework ticket to be implemented in Horde_Compress and would probably make sense here as well.</description> 
   <pubDate>Wed, 18 Mar 2009 13:54:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t53160</link> 
  </item> 
   
  <item> 
   <title>I agree with your comment ( I search compress library in Hor</title> 
   <description>I agree with your comment ( I search compress library in Horde 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.</description> 
   <pubDate>Wed, 18 Mar 2009 14:37:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t53164</link> 
  </item> 
   
  <item> 
   <title>This won&#039;t be committed because it assumes the user has the </title> 
   <description>This won&#039;t be committed because it assumes the user has the PECL module installed.</description> 
   <pubDate>Mon, 30 Mar 2009 22:09:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t53386</link> 
  </item> 
   
  <item> 
   <title>Can you create a patch which works without ZipArchive being </title> 
   <description>Can you create a patch which works without ZipArchive being available?</description> 
   <pubDate>Wed, 03 Jun 2009 13:45:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54394</link> 
  </item> 
   
  <item> 
   <title>&gt; Can you create a patch which works without ZipArchive bein</title> 
   <description>&gt; Can you create a patch which works without ZipArchive being available?



I googled for zip php libs but all I found is: read the file in memory, compress it and write it.

Obviously this doesn&#039;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&#039;s the problem in including one more (useful) package? 

</description> 
   <pubDate>Wed, 03 Jun 2009 17:30:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54395</link> 
  </item> 
   
  <item> 
   <title>Because ZipArchive is from a PHP extension (or PECL package)</title> 
   <description>Because ZipArchive is from a PHP extension (or PECL package), not a PEAR package. Installation is another notch harder. I&#039;m happy to use it if it&#039;s available, but we should not require it.</description> 
   <pubDate>Wed, 03 Jun 2009 17:41:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54396</link> 
  </item> 
   
  <item> 
   <title>... and I forgot to correct myself:

it&#039;s *&quot;Zip PECL extensi</title> 
   <description>... and I forgot to correct myself:

it&#039;s *&quot;Zip PECL extension&quot;* 

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.</description> 
   <pubDate>Wed, 03 Jun 2009 17:47:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54397</link> 
  </item> 
   
  <item> 
   <title>&gt; Because ZipArchive is from a PHP extension (or PECL packag</title> 
   <description>&gt; Because ZipArchive is from a PHP extension (or PECL package), not a 

&gt; PEAR package. Installation is another notch harder. I&#039;m happy to use 

&gt; it if it&#039;s available, but we should not require it.



To explain a bit more: your patch will cause a fatal error if ZipArchive is not installed.  There&#039;s no problem with using ZipArchive if available with a fallback.  Just can&#039;t require the existence of the extension.</description> 
   <pubDate>Wed, 03 Jun 2009 17:56:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54398</link> 
  </item> 
   
  <item> 
   <title>I was writing from scratch a function to create Zip archive </title> 
   <description>I was writing from scratch a function to create Zip archive (mostly 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)

</description> 
   <pubDate>Wed, 10 Jun 2009 18:42:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54524</link> 
  </item> 
   
  <item> 
   <title>&gt; I was writing from scratch a function to create Zip archiv</title> 
   <description>&gt; I was writing from scratch a function to create Zip archive (mostly 

&gt; complete) when I stumbled on this nice piece of software

&gt; http://www.phpconcept.net/pclzip/index.en.php

&gt; Even Joomla uses it.



That library is the definition of mega-bloat.  And it doesn&#039;t do 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&#039;s temp streams, so it will not use more than 2 MB of memory.</description> 
   <pubDate>Tue, 14 Jul 2009 03:00:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8096#t54944</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
