Call to undefined function: mail()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
edwardw
Forum Newbie
Posts: 3
Joined: Thu Aug 04, 2011 8:35 am

Call to undefined function: mail()

Post 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?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Call to undefined function: mail()

Post by Celauran »

Have you checked that /usr/sbin/sendmail exists?
edwardw
Forum Newbie
Posts: 3
Joined: Thu Aug 04, 2011 8:35 am

Re: Call to undefined function: mail()

Post by edwardw »

Celauran wrote:Have you checked that /usr/sbin/sendmail exists?
Yes it does...
Thanks
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Call to undefined function: mail()

Post 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.
edwardw
Forum Newbie
Posts: 3
Joined: Thu Aug 04, 2011 8:35 am

Re: Call to undefined function: mail()

Post 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
Post Reply