For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > April 2007 > No mail()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author No mail()
Miles Thompson

2007-04-27, 6:59 pm

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.

Regards - Miles Thompson

Further note: It was suggested on the php-general list that sendmail binary
was not present. This was a fresh Ubuntu installed. sendmail is installed by
default, but not enabled. I had picked exim, but removed it an installed
postfix.

Remove the package and recompile? How do you tell the ./configure that the
system is using postfix instead of sendmail?
/mt

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com