|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-09 12:50 UTC] djlopez at mail dot com
I got 3 files, part of an eShop:
config.php // contains $mailto
func.php // contains sendmail();
send.php // calls sendmail();
OK, the problem was, I execute send.php:
<?
include("config.php");
include("func.php");
sendmail();
//now HTML-code
?>
sendmail() contains:
<?
function sendmail(){
global $mailto; //and other vars
//now last line
mail($mailto, "Any subject", $body, "From: any@adress.com");
}
?>
Now, PHP crashed without a reason, server error page appears, nothing wrote to the error.log!
I changed the mail-function in:
mail("the@recipient.com", "Any subject", $body, "From: any@adress.com");
Now it worked fine!
Dunno if its a bug, but it was difficult to catch the error!
Apache Server, tested with PHP 4.0.6 and 4.1.2
(err, sorry 4 bad english)
greets,
Lopez
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 07:00:01 2025 UTC |
Sorry, can't backtrace on my server! But it's really reproducible! so here's the set of files: send.php: <? include("func.php"); sendmail(); ?> func.php: <? function sendmail(){ global $mailto; mail($mailto, "Subject", "Body", "From: djlopez@gmx.de"); } ?> config.php: <? $mailto="djlopez@gmx.de"; ?> Just put this 3 files on a server in the same directory, and start "send.php" in your browser. It shouldn't work.