Bug #18414 Updated: FATAL: emalloc(): Unable to allocate -10787289 bytes
| From: | gilles at clixicon dot nl | Date: | Thu, 18 Jul 2002 16:03:56 +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-14538@lists.php.net to get a copy of this message | ||
ID: 18414
Updated by: gilles@clixicon.nl
Reported By: gilles@clixicon.nl
Status: Open
Bug Type: *Mail Related
Operating System: linux redhat
PHP Version: 4.2.1
New Comment:
i also tried to get rid of the trailing whitespace with str_replace but
it just stays there staring back at me.
Previous Comments:
------------------------------------------------------------------------
[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