Re: mail() question
| From: | Curt Zirzow | Date: | Mon, 25 Aug 2003 01:51:42 +0000 |
| Subject: | Re: mail() question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160625@lists.php.net to get a copy of this message | ||
* Thus wrote Matthias Wulkow (elektrik@gmx.net):
> Hallo Curt,
>
> am Montag, 25. August 2003 um 01:35 hast Du Folgendes gekritzelt:
>
> >> I have followig error reported:
> >>
> >> Fatal error: Call to undefined function: mail() in /usr/local/www/login.php on line
> >> 235
> >>
> >> What is the trouble here? If I would have trouble because of
> >> delivery, normally mail would return false. But here...
>
> CZ> mail() wasn't compiled into php.
>
> >>
> >> I have php4.3.1 running on linux. I just installed postfix to have the
> >> sendmail binary at the right place.
>
> CZ> You'll have to recompile php. the first time you compiled it php it
> CZ> couldnt find sendmail, so it left it out in the binary.
>
> Well, that makes sense to me. But I just recompiled the same way I did
> it first time (config.nice), but I still get the same error reported.
> I looked in ./configure --help to see if there are specific arguments
> I need to add, but couldn't find any... and this time sendmail is
> there (/usr/sbin/sendmail).
>
> What's wrong?
When you configure PHP it uses your $PATH envirmonment (plus som
e standard paths.)
To get more detailed on the situation There is a file in your surce
tree:
main/php_config.h:
there should be a line (around line #972) that says something like:
#define HAVE_SENDMAIL 1
If it says 'undef HAVE_SENDMAIL', that generaly means that your
configure script can't find it.
If this is the case I would strongly encourge a search/report at
bugs.php.net to find out how to resolve this.
As long as your sendmail is in a common place you shouldn't have
any problems.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."