Page 1 of 1

Call to undefined function: mail()

Posted: Thu Aug 04, 2011 8:38 am
by edwardw
Hi all
I have recently moved a php application my company uses to a different server (it worked fine on the previous one)
I have configured the new linux machine from scratch..
Eventually getting PostgreSQL to work, the only problem i now have is the following
Fatal error: Call to undefined function: mail() in /usr/local/apache/htdocs/classes/***.inc on line 1446

Seems to me like for what ever reason the mail/sendmail function has not come installed with PHP...
Anyone have any ideas?

Re: Call to undefined function: mail()

Posted: Thu Aug 04, 2011 9:10 am
by Celauran
Have you checked that /usr/sbin/sendmail exists?

Re: Call to undefined function: mail()

Posted: Thu Aug 04, 2011 9:23 am
by edwardw
Celauran wrote:Have you checked that /usr/sbin/sendmail exists?
Yes it does...
Thanks

Re: Call to undefined function: mail()

Posted: Thu Aug 04, 2011 9:28 am
by Celauran
Did you compile PHP yourself? Did /usr/sbin/sendmail exist at that time? From what I've read, that error indicates the sendmail executable was missing at PHP compile time.

Re: Call to undefined function: mail()

Posted: Thu Aug 04, 2011 9:32 am
by edwardw
Celauran wrote:Did you compile PHP yourself? Did /usr/sbin/sendmail exist at that time? From what I've read, that error indicates the sendmail executable was missing at PHP compile time.
Yes compiled it myself, and originally it wasnt, however i did recompile after it existed.
thanks