Re: help with mail() function

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



What configure command did you use Bill. I've compiled php 5.2.1 on Fedora Core 6, and used the following configure command:

'./configure' '--with-apxs2=/usr/local/apache-2.2.0/bin/apxs' '--prefix=/usr/local/php-5.2.1' '--enable-shared=all' '--with-mysql=shared' '--with-mysql-sock=/var/lib/databases/mysql/mysql.sock' '--with-mysqli=shared' '--with-pgsql=/usr/local/postgresql-8.2.1/bin' '--with-xsl' '--with-zlib-dir=/usr/include'

mail() is working OK on my system.


From the manual:

LXXIX. Mail Functions
Introduction
 The mail() function allows you to send mail.

Requirements
For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.

Installation
There is no installation needed to use these functions; they are part of the PHP core.

Did php actually find the sendmail binary or its equivalent when you compiled php?

Regards

Keith

On Fri, 27 Jul 2007, Bill Beck wrote:

To: php-install@xxxxxxxxxxxxx
From: Bill Beck <bbeck@xxxxxxxxxxxx>
Subject:  help with mail() function

Hello all,

I've compiled PHP5 on an Ubuntu machine. Getting this error when trying to use mail(), and have looked for the obvious problems:

error message:

*Fatal error*: Call to undefined function mail()

After running ./configure (as root) it shows that php found sendmail, and my admin panel confirms it's running:

checking for sendmail... (cached) /usr/sbin/sendmail

So sendmail is there, and the php_config.h file indeed shows #define HAVE_SENDMAIL 1
but no mail function.

Any thoughts?

Thanks,

Bill B


--
------------------------------------------------------------
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

This email address is challenge-response protected with
http://www.tmda.net
------------------------------------------------------------

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux