php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18414 FATAL: emalloc(): Unable to allocate -10787289 bytes
Submitted: 2002-07-18 11:52 UTC Modified: 2002-07-19 04:48 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: gilles at clixicon dot nl Assigned:
Status: Closed Package: *Mail Related
PHP Version: 4.2.1 OS: win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gilles at clixicon dot nl
New email:
PHP Version: OS:

 

 [2002-07-18 11:52 UTC] gilles at clixicon dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-18 12:03 UTC] gilles at clixicon dot 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 13:36 UTC] sniper@php.net
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.
 [2002-07-19 04:48 UTC] sniper@php.net
fixed OS..and this should be fixed in CVS (the non-stable branch)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC