ID:               30770
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chris at christopher-dean dot co dot uk
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: FreeBSD 5.2.1
 PHP Version:      5.0.2
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2004-11-13 01:45:39] chris at christopher-dean dot co dot uk

Forgot to mention, the email does get sent

------------------------------------------------------------------------

[2004-11-13 01:42:26] chris at christopher-dean dot co dot uk

Description:
------------
I am using php 5.0.2 with apache 2.0.52 on freebsd 5.2.1-RELEASE

whenever the mail() is invoked in a php script e.g. by clicking submit
on a mail form, apache 'crashes' (although it doesn't die completely,
maybe it restarts?) and this error of this form is produced in the
logs:

www kernel: pid 20225 (httpd), uid 80: exited on signal 6

Any ideas what I can do to fix this if it isn't a bug within php
itself?

Reproduce code:
---------------
<?      if(empty($_POST['name']))
                echo "The name field was empty. Please click back and fill in 
your
name";
        else if(empty($_POST['email']))
                echo "The email field was empty. Please click back and fill in 
your
email address";
        else if(empty($_POST['message']))
                echo "You did not enter a message. Please click back and write 
us a
message";
        else
        {
                $headers = "From: ".$_POST['name']." <".$_POST['email'].">\r\n"
                ."reply-to:".$_POST['email']."\r\n";

                mail("[EMAIL PROTECTED]", "Message from the Media website",
$_POST['message'], $headers);   
?>
<p>Thank you for your message, we will be in contact shortly if
nessary.</p>

Expected result:
----------------
the thank you message appear on the page

Actual result:
--------------
I get the page cannot be displayed message from internet explorer
indicating apache's basically not running, but on refresh the orginal
email us submittal form comes up blank as if it has ben loaded up for
the first time (which stands to reason if apache's crashed or
restarted). 

FYI: the format of the page is an 'email us' form with the form's
action being the same page, then if(isset(Submit)){...} is used execute
the mail() when sumbmited. 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30770&edit=1

Reply via email to