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

From: Date: Tue, 09 Apr 2002 17:55:27 +0000
Subject: Bug #16516 Updated: mail doesn't work with globalized vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4456@lists.php.net to get a copy of this message
ID: 16516 Updated by: sander@php.net Reported By: djlopez@mail.com -Status: Open +Status: Feedback Bug Type: Mail related Operating System: FreeBSD 4.4 PHP Version: 4.1.2 New Comment: To properly diagnose this bug, 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". Previous Comments: ------------------------------------------------------------------------ [2002-04-09 12:50:57] djlopez@mail.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16516&edit=1

« previous php.bugs (#4456) next »