Bug #16516: mail doesn't work with globalized vars

From: Date: Tue, 09 Apr 2002 16:50:57 +0000
Subject: Bug #16516: mail doesn't work with globalized vars
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4453@lists.php.net to get a copy of this message
From: djlopez@mail.com 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: 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 -- 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

« previous php.bugs (#4453) next »