[bugs] [Bug 1301] New - Bug on compose.php line 345 ? x = func1(func2(x)) does not work

bugs at bugs.horde.org bugs at bugs.horde.org
Tue Jul 8 12:15:13 PDT 2003


http://bugs.horde.org/show_bug.cgi?id=1301

*** shadow/1301	Tue Jul  8 16:15:13 2003
--- shadow/1301.tmp.16163	Tue Jul  8 16:15:13 2003
***************
*** 0 ****
--- 1,73 ----
+ Bug#: 1301
+ Product: Horde
+ Version: 2.2 Stable
+ Platform: PHP Code
+ OS/Version: FreeBSD
+ Status: NEW   
+ Resolution: 
+ Severity: normal
+ Priority: P2
+ Component: IMP
+ Area: BUILD
+ AssignedTo: chuck at horde.org                            
+ ReportedBy: edv at via-berlin.de               
+ URL: 
+ Summary: Bug on compose.php line 345 ?  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
+ 
+ Answer from php.net:
+ 
+ [8 Jul 1:25pm CDT] gschlossnagle at php.net 
+ Thank you for taking the time to write to us, but this is not
+ a bug. Please double-check the documentation available at
+ http://www.php.net/manual/ and the instructions on how to report
+ a bug at http://bugs.php.net/how-to-report.php
+ 
+ This is not a bug, simply representative of the different 
+ ways that PHP needs to manage temporary variables.  At any 
+ rate, for handling multiple copies of message bodies that 
+ large (as your code does), you memory limit is too low.
+ 
+ 
+ [8 Jul 1:42pm CDT] sysop at kluware dot de 
+ So you think thats an error of HORDE/IMP coders? 
+ 
+ 
+ 


More information about the bugs mailing list