By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

Call to undefined function mail()

P: n/a
Hi All,

I'm running a bulleting board in PHP and everytime a new user
registers s/he is supposed to receive an email confirmation. After
filling out the registration form and clicking on submit I get the
following error message:

Fatal error: Call to undefined function: mail() in
/usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

From what I've read I needed to have sendmail running, and it is. and
I needed to add my sendmail path to the php.ini file, which I also
did:

; For Unix only. You may supply arguments as well (default: sendmail
-t -i).
sendmail_path =/usr/bin/sendmail

Also, I tried to add my mail server IP address for SMTP, even though
it says Fro win32 only....but I wanted to use my mailserver to send
emails

I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
from RedHat.

Originally I had unninstalled the sendmail package b/c it was hanging
when I started my machine. I then installed PHP 4.3.4 and then when I
realized I needed sendmail to use the feature from the bulletin board
I reinstalled it.

Any thoughts/suggestions? I appreciate any help.

sincerely,
CoralineSage
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
CoralineSage wrote:
Hi All,

I'm running a bulleting board in PHP and everytime a new user
registers s/he is supposed to receive an email confirmation. After
filling out the registration form and clicking on submit I get the
following error message:

Fatal error: Call to undefined function: mail() in
/usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

From what I've read I needed to have sendmail running, and it is. and
I needed to add my sendmail path to the php.ini file, which I also
did:

; For Unix only. You may supply arguments as well (default: sendmail
-t -i).
sendmail_path =/usr/bin/sendmail

Also, I tried to add my mail server IP address for SMTP, even though
it says Fro win32 only....but I wanted to use my mailserver to send
emails

I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
from RedHat.

Originally I had unninstalled the sendmail package b/c it was hanging
when I started my machine. I then installed PHP 4.3.4 and then when I
realized I needed sendmail to use the feature from the bulletin board
I reinstalled it.

Any thoughts/suggestions? I appreciate any help.


Did you try re-building PHP after you re-installed sendmail? My guess is
that when you compiled php, there were no headers available for building
the mail function. Unless someone else has a better idea, it's worth a
try... start from ./configure

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 17 '05 #2

P: n/a
It was hanging most likely becouse it was trying to find its host name, your
can hard code it in /etc/mail/sendmail.cf

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"CoralineSage" <FV**********@spammotel.com> wrote in message
news:9d**************************@posting.google.c om...
Hi All,

I'm running a bulleting board in PHP and everytime a new user
registers s/he is supposed to receive an email confirmation. After
filling out the registration form and clicking on submit I get the
following error message:

Fatal error: Call to undefined function: mail() in
/usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

From what I've read I needed to have sendmail running, and it is. and
I needed to add my sendmail path to the php.ini file, which I also
did:

; For Unix only. You may supply arguments as well (default: sendmail
-t -i).
sendmail_path =/usr/bin/sendmail

Also, I tried to add my mail server IP address for SMTP, even though
it says Fro win32 only....but I wanted to use my mailserver to send
emails

I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
from RedHat.

Originally I had unninstalled the sendmail package b/c it was hanging
when I started my machine. I then installed PHP 4.3.4 and then when I
realized I needed sendmail to use the feature from the bulletin board
I reinstalled it.

Any thoughts/suggestions? I appreciate any help.

sincerely,
CoralineSage

Jul 17 '05 #3

P: n/a
Justin Koivisto <sp**@koivi.com> wrote in message news:<iQ****************@news7.onvoy.net>...
CoralineSage wrote:
Hi All,

I'm running a bulleting board in PHP and everytime a new user
registers s/he is supposed to receive an email confirmation. After
filling out the registration form and clicking on submit I get the
following error message:

Fatal error: Call to undefined function: mail() in
/usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

From what I've read I needed to have sendmail running, and it is. and
I needed to add my sendmail path to the php.ini file, which I also
did:

; For Unix only. You may supply arguments as well (default: sendmail
-t -i).
sendmail_path =/usr/bin/sendmail

Also, I tried to add my mail server IP address for SMTP, even though
it says Fro win32 only....but I wanted to use my mailserver to send
emails

I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
from RedHat.

Originally I had unninstalled the sendmail package b/c it was hanging
when I started my machine. I then installed PHP 4.3.4 and then when I
realized I needed sendmail to use the feature from the bulletin board
I reinstalled it.

Any thoughts/suggestions? I appreciate any help.


Did you try re-building PHP after you re-installed sendmail? My guess is
that when you compiled php, there were no headers available for building
the mail function. Unless someone else has a better idea, it's worth a
try... start from ./configure


Actually, yes. I found this suggestion elsewhere yesterday and tried
re-building PHP...it still didn't work :( Thanks for the suggestion
though.

CoralineSage
Jul 17 '05 #4

P: n/a
Yes, I read that somewhere. I will try hard coding it, even though I
haven't had problems after the re-install. Thanks for replying Mike.

sincerely,
CoralineSage
"CountScubula" <me@scantek.hotmail.com> wrote in message news:<rC*****************@newssvr25.news.prodigy.c om>...
It was hanging most likely becouse it was trying to find its host name, your
can hard code it in /etc/mail/sendmail.cf

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"CoralineSage" <FV**********@spammotel.com> wrote in message
news:9d**************************@posting.google.c om...
Hi All,

I'm running a bulleting board in PHP and everytime a new user
registers s/he is supposed to receive an email confirmation. After
filling out the registration form and clicking on submit I get the
following error message:

Fatal error: Call to undefined function: mail() in
/usr/local/apache2/htdocs/ubbthreads/ubbt.inc.php on line 212

From what I've read I needed to have sendmail running, and it is. and
I needed to add my sendmail path to the php.ini file, which I also
did:

; For Unix only. You may supply arguments as well (default: sendmail
-t -i).
sendmail_path =/usr/bin/sendmail

Also, I tried to add my mail server IP address for SMTP, even though
it says Fro win32 only....but I wanted to use my mailserver to send
emails

I'm running on RedHat 8, PHP 4.3.4 and sendmail default installation
from RedHat.

Originally I had unninstalled the sendmail package b/c it was hanging
when I started my machine. I then installed PHP 4.3.4 and then when I
realized I needed sendmail to use the feature from the bulletin board
I reinstalled it.

Any thoughts/suggestions? I appreciate any help.

sincerely,
CoralineSage

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.