Bug #18414: FATAL: emalloc(): Unable to allocate -10787289 bytes

From: Date: Thu, 18 Jul 2002 15:52:18 +0000
Subject: Bug #18414: FATAL: emalloc(): Unable to allocate -10787289 bytes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14537@lists.php.net to get a copy of this message
From: gilles@clixicon.nl Operating system: linux redhat PHP version: 4.2.1 PHP Bug Type: *Mail Related Bug description: FATAL: emalloc(): Unable to allocate -10787289 bytes 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 bug report at http://bugs.php.net/?id=18414&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18414&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18414&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18414&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18414&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18414&r=support Expected behavior: http://bugs.php.net/fix.php?id=18414&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18414&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18414&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18414&r=globals

« previous php.bugs (#14537) next »