From:             sysop at kluware dot de
Operating system: FreeBSD 4.8 Stable
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  x = func1(func2(x)) does not work

Description:
------------
We are using IMP/JORDE an our IMAP server. With PHP 4.3.2 (and 4.3.3RC1)
we get an error when we try to send very large attachments (> 1.5 MB).

IMP aborts with an error like 


Fatal error: Allowed memory size of 16777216 bytes exhausted at (null):0
(tried 
to allocate 7565911 bytes) in /var/spool/www/via/phproject/addons/E-
Mail/imp/compose.php on line 345




Reproduce code:
---------------
When analysing the code at line 345, we found that 

$contents = chunk_split(base64_encode($contents),76,"\n");

does not realibly work, while

 $contents1 = base64_encode($contents);
 $contents = chunk_split($contents1,76,"\n");

doese the job ...


Expected result:
----------------
both codelines should have the same result ...


Actual result:
--------------
1. Fatal error: Allowed memory size of 16777216 bytes exhausted at
(null):0 (tried 
to allocate 7565911 bytes) in /var/spool/www/via/phproject/addons/E-
Mail/imp/compose.php on line 345


2. ok

-- 
Edit bug report at http://bugs.php.net/?id=24542&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24542&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24542&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24542&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24542&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24542&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24542&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24542&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24542&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24542&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24542&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24542&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24542&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24542&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24542&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24542&r=gnused

Reply via email to