|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14855 Access Violation when using "Cc:" in mail()
Submitted: 2002-01-04 13:36 UTC Modified: 2002-05-24 20:26 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: bernd dot sluka at kmz dot de Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.6 OS: Windows NT 4.0 (SP6)
Private report: No CVE-ID: None
 [2002-01-04 13:36 UTC] bernd dot sluka at kmz dot de
Configuration: PHP 4.0.6 on a Windows NT System with IIS 3

Calling mail() with an "Cc:"-headerline in the "additional_headers" (4th) argument
results in an crash of the php module and the webserver. If the "Cc:"-string is
commented out, everything works fine.

Error: "PHP has encountered an Access Violation at 0177B474"


setlocale ("LC_TIME", "");

$recp = "";
$subject = "Test";
$body = "Test\n";


if ( mail($recp . $cc, $subject, $body , "Cc:\n" ) )
  print "Mail ok!";
} else {
  print "No mail today!";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-04 14:17 UTC] bernd dot sluka at kmz dot de
Some comments and one correction:

1. The Server is an IIS, Version _4_

2. I've now installed PHP 4.1.1 and the problem remains.

3. I'm using the SAPI-Module. When using php.exe the error
    changes to an allocation error (and the webserver does not
    "FATAL: emalloc(): Unable to allocate -11967191 bytes"
 [2002-01-04 14:26 UTC] bernd dot sluka at kmz dot de
One last addition:

Using "CC:" instead of "Cc:" works and does NOT crash.

 [2002-05-24 20:26 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jun 24 09:01:23 2021 UTC