Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.8

Request #13969 Patch to stream attachments to counter memory issues
Submitted: 2008-05-23 14:38 UTC Modified: 2010-01-04 14:29 UTC
From: till Assigned: alec
Status: Closed Package: Mail_Mime (version 1.5.2)
PHP Version: 5.2.5 OS: any
Roadmaps: 1.6.0RC1    
Subscription  


 [2008-05-23 14:38 UTC] till (Till Klampaeckel)
Description: ------------ Here is a link to a patch which one of our users supplied us with. It also contains a patch against Mail_mime to add the possibility to stream attachments because when you read larger attachments into the memory, you constantly run into the memory_limit: http://public.lanl.gov/jbarbuc/patches/roundcube/ Let me know if I can help to apply this.

Comments

 [2008-05-26 07:32 UTC] till (Till Klampaeckel)
I added Mail_mime.diff, it's the patch from above url, but only the relevant files to Mail_Mime (mime.php and mimePart.php).
 [2009-12-15 13:26 UTC] ahanton (Andy Hanton)
I just added the simplified patch. It tries to minimize memory use without changing the api. It reads files in 1mb chunks and avoids holding unnecessary copies of the output in memory. WIth this patch, building a message with a 20mb attachment takes about 56mb of memory instead of 140mb. While this level of memory use is not ideal, it is much better than the existing code. Hopefully this will be easier to merge than the existing patch.
 [2009-12-29 10:34 UTC] alec (Aleksander Machniak)
-Assigned To: +Assigned To: alec -Roadmap Versions: +Roadmap Versions: 1.6.0RC1
 [2010-01-04 14:29 UTC] alec (Aleksander Machniak)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.