Bug #18414 Updated: FATAL: emalloc(): Unable to allocate -10787289 bytes
| From: | sniper@php.net | Date: | Thu, 18 Jul 2002 17:36:26 +0000 |
| Subject: | Bug #18414 Updated: FATAL: emalloc(): Unable to allocate -10787289 bytes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14544@lists.php.net to get a copy of this message | ||
ID: 18414
Updated by: sniper@php.net
Reported By: gilles@clixicon.nl
-Status: Open
+Status: Closed
Bug Type: *Mail Related
Operating System: linux redhat
PHP Version: 4.2.1
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-07-18 12:03:55] gilles@clixicon.nl
i also tried to get rid of the trailing whitespace with str_replace but
it just stays there staring back at me.
------------------------------------------------------------------------
[2002-07-18 11:52:17] gilles@clixicon.nl
first of all,
i could not get multiple CC's get to work:
-----------------------------------
function send(){
$headers = "";
if($this->from_address != ""){
$headers .= "From: " . $this->from_address . "\r\n";
}
if($this->cc_address != ""){
$cc = str_replace(" ","",$this->cc_address);
$cc = str_replace(",",", ",$cc);
$headers .= "Cc: " . $cc . "\r\n";
}
mail($this->to_address, $this->subject, $this->message,
$headers);
}
mail($this->to_address, $this->subject, $this->message, $headers);
------------------------------------------
this only sends a cc to the first cc address,
so i checked what the headers looked like and i noticed that there was
a blank space at the end.
so i apply the trim function this to $headers:
---------------------------------------------
function send(){
$headers = "";
if($this->from_address != ""){
$headers .= "From: " . $this->from_address . "\r\n";
}
if($this->cc_address != ""){
$cc = str_replace(" ","",$this->cc_address);
$cc = str_replace(",",", ",$cc);
$headers .= "Cc: " . $cc . "\r\n";
}
$headers_trimmed = trim($headers);
mail($this->to_address, $this->subject, $this->message,
$headers_trimmed);
}
---------------------------------------------
and there you have it:
FATAL: emalloc(): Unable to allocate -10787289 bytes
---
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-imap'
'--with-mysql=/usr' '--enable-track-vars'
'--with-openssl=/usr/local/ssl' '--enable-sockets' '--with-xml'
'--with-zlib' '--with-java=/usr/local/j2sdk1.4.0' '--with-pgsql'
apache 1.3.26
sendmail-8.9.3-20
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18414&edit=1