473,418 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Call to undefined function mail()

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
4 3015
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: A. Name | last post by:
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...
9
by: Netocrat | last post by:
Any comments on the correctness of the statements 1, 2a, 2b, 3 and 4 in the code below? If they are correct, then the definition of an object as well as that of an lvalue is broken in C99 by the...
11
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other...
3
by: number1yan | last post by:
Can anyone help me, i am creating a website and am using a php script that recomends the website to other people. I keep getting the same error and can not work out why. The error is: Notice:...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
34
by: Srinu | last post by:
Hi all, Can we assign return value of a function to a global variable? As we know, main() will be the first function to be executed. but if the above is true, then we have a function call before...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
4
by: nickyspace | last post by:
HI all I have a little issue with this php code. Below is the code CODE: PHP 1.<?
9
by: Yannick | last post by:
Hi everyone - I am not quite sure to understand what is really going on when a function defined in one translation unit calls a function defined in a different translation unit without knowing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.