469,267 Members | 971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

Call to undefined function: mail()

Hello All!

I'm a newbie to Linux and to PHP, so please be kind. I'm trying to
tie into SendMail with some code and get the following error:

Fatal error: Call to undefined function: mail() in
/usr/local/apache/htdocs/development/test.php on line 317

I installed SendMail after PHP. I was told that it could be my
problem and I would have reinstall PHP. Does this sound right to
anyone? Should I just be able to define the path to SendMail in a
php.ini?

Looking for guidance...hoping I won't have to reinstall PHP...the
process is still a little scary for me.

Thanks!
Jul 17 '05 #1
5 9794
You have to define sendmail_path in php.ini

Savut

"A. Name" <or****@hotmail.com> wrote in message
news:d1*************************@posting.google.co m...
Hello All!

I'm a newbie to Linux and to PHP, so please be kind. I'm trying to
tie into SendMail with some code and get the following error:

Fatal error: Call to undefined function: mail() in
/usr/local/apache/htdocs/development/test.php on line 317

I installed SendMail after PHP. I was told that it could be my
problem and I would have reinstall PHP. Does this sound right to
anyone? Should I just be able to define the path to SendMail in a
php.ini?

Looking for guidance...hoping I won't have to reinstall PHP...the
process is still a little scary for me.

Thanks!

Jul 17 '05 #2
Savut,

I have defined it. Still no dice...that's why I'm posting.

"Savut" <we***@hotmail.com> wrote in message news:<bn********************@news20.bellglobal.com >...
You have to define sendmail_path in php.ini

Savut

"A. Name" <or****@hotmail.com> wrote in message
news:d1*************************@posting.google.co m...
Hello All!

I'm a newbie to Linux and to PHP, so please be kind. I'm trying to
tie into SendMail with some code and get the following error:

Fatal error: Call to undefined function: mail() in
/usr/local/apache/htdocs/development/test.php on line 317

I installed SendMail after PHP. I was told that it could be my
problem and I would have reinstall PHP. Does this sound right to
anyone? Should I just be able to define the path to SendMail in a
php.ini?

Looking for guidance...hoping I won't have to reinstall PHP...the
process is still a little scary for me.

Thanks!

Jul 17 '05 #3
On 21 Jan 2004 04:05:30 -0800, or****@hotmail.com (A. Name) wrote:

Maybe check disabled functions in php.ini and consult the config-line,
if compiled in phpinfo()

HTH, Jochen
Hello All!

I'm a newbie to Linux and to PHP, so please be kind. I'm trying to
tie into SendMail with some code and get the following error:

Fatal error: Call to undefined function: mail() in
/usr/local/apache/htdocs/development/test.php on line 317

I installed SendMail after PHP. I was told that it could be my
problem and I would have reinstall PHP. Does this sound right to
anyone? Should I just be able to define the path to SendMail in a
php.ini?

Looking for guidance...hoping I won't have to reinstall PHP...the
process is still a little scary for me.

Thanks!


--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #4
Hello,

On 01/22/2004 12:13 AM, A. Name wrote:
I have defined it. Still no dice...that's why I'm posting.


Usually this happens with RedHat installations of PHP compiled manually
by a non-root user. What happens is that PHP configure does not find
sendmail program in the PATH and disables the mail function. The
solution is to rebuild PHP adding first to the PATH the directory where
the sendmail executable can be found, usually /usr/lib/sendmail but that
often that is a link to /usr/sbin/sendmail .

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

MetaL - XML based meta-programming language
http://www.meta-language.net/

Jul 17 '05 #5
Manuel,

Is it absolutely necessary to compile PHP to get SendMail configured
to work with it? I did install SendMail after PHP, so the situation
you describing is probably correct. What if I don't remember the cmd
line code I used to compile PHP...the ./configure php-install --with
aspx...obvious that's not it, but you should get the idea of what I
mean. Will I have a problem?
Manuel Lemos <ml****@acm.org> wrote in message news:<bu************@ID-138275.news.uni-berlin.de>...
Hello,

On 01/22/2004 12:13 AM, A. Name wrote:
I have defined it. Still no dice...that's why I'm posting.


Usually this happens with RedHat installations of PHP compiled manually
by a non-root user. What happens is that PHP configure does not find
sendmail program in the PATH and disables the mail function. The
solution is to rebuild PHP adding first to the PATH the directory where
the sendmail executable can be found, usually /usr/lib/sendmail but that
often that is a link to /usr/sbin/sendmail .

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

MetaL - XML based meta-programming language
http://www.meta-language.net/

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by CoralineSage | last post: by
9 posts views Thread by Netocrat | last post: by
3 posts views Thread by number1yan | last post: by
9 posts views Thread by CryptiqueGuy | last post: by
34 posts views Thread by Srinu | last post: by
9 posts views Thread by Yannick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.