|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21442 empty recipient for mail() function crashed Apache
Submitted: 2003-01-05 14:57 UTC Modified: 2003-01-07 05:21 UTC
From: john dot wong at q-surf dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.3.0 OS: Windows NT4 Server
Private report: No CVE-ID:
 [2003-01-05 14:57 UTC] john dot wong at q-surf dot com
A script like

mail("", "test", "test");

crashed Apache server (1.3.26).
PHP is installed as a Apache module.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 15:52 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

 [2003-01-05 16:11 UTC] john dot wong at q-surf dot com
I can certainly send email if a valid email address is specified. The problem is that passing an empty string as the first parameter of mail() in Windows version of PHP 4.3.0 and Apache crashed (Dr. Watson popped up and said address violation) is not normal. I expect some error messages are sent to the browser instead of crashing Apache.
 [2003-01-05 16:24 UTC]
it is sendmail that should handle this, not php...
 [2003-01-05 16:27 UTC]
sendmail on windows? Let's keep it open until we have somebody who can reproduce this on windows, I just tried with the CLI and couldn't get it to crash (latest CVS), so you might want to try a snapshot from (go for a development snapshot).

 [2003-01-05 16:31 UTC] john dot wong at q-surf dot com
I am using Windows version of PHP and how can sendmail involved! I read from the doc. that PHP forward the mail to a SMTP server for Win version of PHP.
 [2003-01-07 04:11 UTC]
I could reproduce this in 4.3.0 but it seems fixed after the release. Please try
 [2003-01-07 04:51 UTC]
Strike that. Can still reproduce it.
 [2003-01-07 05:21 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot 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 in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 23:01:35 2015 UTC