Re: No mail() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/27/07, Stut <stuttle@xxxxxxxxx> wrote:
Miles Thompson wrote:
> Does anyone have any ideas?
>
> PHP 5.2 was compiled from source, the mail path is set to /usr/sbin/postfix
> in php.ini, and Apache has been restarted. The mail path shows up in
> phpinfo().
>
> A  trivial PHP script, written to see if mail could be sent from PHP,
> returns this error:
>
> *Fatal error*: Call to undefined function mail() in *
> /var/www/junk/testmail.php* on line *9
>
> *The docs say that mail is a core function, like so:
>     "There is no installation needed to use these functions; they are part
> of the PHP core"
>
> It's a UBUNTU server, so when compiling I sudo'ed and configure / make /
> checkinstall (instead of make install) worked fine.
>
> However, in phpinfo() under the "standard"  heading there is no :
>         Path to sendmail     /usr/sbin/sendmail -t -i
> like there is on our production server.
>
> Suggestions and advice will be welcomed.

When PHP is compiled on UNIX it looks for the sendmail binary. If it
can't find it the mail function will not be included. That's probably
what happened here. I suggest you run configure again and check the
output for mail-related issues. If you need further assistance, email
the install list.

-Stut


I had exactly the same problem, it seems that when compiling the
source, PHP looks in a php.ini file, and there the path to sendmail
needs to be correct.

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux