From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.4
PHP version: 4.1.2
PHP Bug Type: Mail related
Bug description: mail doesn't work with globalized vars
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: [EMAIL PROTECTED]");
}
?>
Now, PHP crashed without a reason, server error page appears, nothing
wrote to the error.log!
I changed the mail-function in:
mail("[EMAIL PROTECTED]", "Any subject", $body, "From: [EMAIL PROTECTED]");
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
--
Edit bug report at http://bugs.php.net/?id=16516&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16516&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16516&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16516&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16516&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16516&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16516&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16516&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16516&r=submittedtwice