6.0.0-beta1
7/3/25

[#6676] Large attachments
Summary Large attachments
Queue IMP
Queue Version HEAD
Type Enhancement
State Duplicate
Priority 1. Low
Owners
Requester david.newcomb (at) bigsoft (dot) co (dot) uk
Created 05/02/2008 (6271 days ago)
Due
Updated 05/02/2008 (6271 days ago)
Assigned
Resolved 05/02/2008 (6271 days ago)
Milestone
Patch No

History
05/02/2008 05:07:20 PM Michael Slusarz Comment #5
State ⇒ Duplicate
Reply to this comment
Duplicate of Ticket 4753.
05/02/2008 05:01:55 PM Chuck Hagenbuch Comment #4 Reply to this comment
K, well, that won't be helped by saving the data to a file.



Michael S., wasn't this improved recently?
05/02/2008 04:48:26 PM david (dot) newcomb (at) bigsoft (dot) co (dot) uk Comment #3 Reply to this comment
It is exploding at:

$Horde: imp/lib/MIME/Contents.php,v 1.153.4.45 2007/08/07 19:53:40 
slusarz Exp $

/usr/share/psa-horde/imp/lib/MIME/Contents.php 173



The error is:

[client xxx.xxx.xxx.xxx] PHP Fatal error:  Allowed memory size of 
33554432 bytes exhausted (tried to allocate 9962983 bytes) in 
/usr/share/psa-horde/imp/lib/MIME/Contents.php on line 173

Allowed memory size of 33554432 bytes exhausted (tried to allocate 0 bytes)



I think you (the royal you) are reading all the mime attachments into memory.



The attachment was 9MB so given:

             $this->_bodypart[$id] = str_replace("\r\n", "\n", 
$this->_bodypart[$id]);

You need 18MB of storage not including any other copies which may be 
in scope, or other attachments.


05/02/2008 03:27:57 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Can you be more specific about where memory is exhausted? We could 
save the data to a file, but without stream support in the imap 
module, we're just as likely to run out of memory fetching the data to 
put in that file as we are serving it back to the user.
05/02/2008 11:11:32 AM david (dot) newcomb (at) bigsoft (dot) co (dot) uk Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Large attachments
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ New
Reply to this comment
Occasionally my users get send large attachments which don't download 
because the php process exceeds the php max memory.

Is there a chance that the file could be saved locally so the user can 
download the file via normal http i.e. not via a php program.



I could increase the php max memory, but that option is there for my 
"general" protection and shouldn't really be used for these types of 
things.

Saved Queries