PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_Mime » Bug #1783

PHP crashes on big attachments

Details

Submitted2004-07-04 09:58 UTC
Fromtomee at kadu dot net
StatusBogus
PackageMail_Mime
PHP Version4.3.7
OSLinux 2.6
Roadmaps(Not assigned)

Comments

[2004-07-04 09:58 UTC] tomee at kadu dot net

Description:
------------
I have e-mails stored in a database.
I must support huge attachments (up to 50M).
When I try to decode the e-mail, Apache2 simply closes the
connection, yielding the following error:
FATAL: emalloc(): Unable to allocate 12544116 bytes

I figured that it takes a second to SELECT the message out
of db and assign it to a variable, but it simply crashes on
$st = Mail_mimeDecode::decode($params). I set the
parameters to include bodies, decode headers and decode
bodies, but setting the latter to false does not help.

Reproduce code:
---------------
Just try to decode any message that is of 10M size, on a 466MHz machine with 160 Megs of ram.

Expected result:
----------------
I expect it to return the goddamn object within a
reasonable period of time ;)

Actual result:
--------------
FATAL: emalloc(): Unable to allocate 12544116 bytes in
error_log and closed connection.