473,809 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3044
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
"CoralineSa ge" <FV**********@s pammotel.com> wrote in message
news:9d******** *************** ***@posting.goo gle.com...
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
"CountScubu la" <me@scantek.hot mail.com> wrote in message news:<rC******* **********@news svr25.news.prod igy.com>...
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
"CoralineSa ge" <FV**********@s pammotel.com> wrote in message
news:9d******** *************** ***@posting.goo gle.com...
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
10243
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 /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
9
2032
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 following reasoning: foo() does not return an object, so the return of foo() conceptually is not stored, yet we are able to obtain a pointer to one of its member elements, therefore it must be stored, therefore foo() does return an object,...
11
2747
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 problems? Of course, I presume that inside f I don't access i in case it was called via g. int f(int i){ /* ... */ return 0; }
3
5505
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: Undefined index: FriendName in D:\Yan\Over_8\SendEmail.php on line 4, Notice: Undefined index: FriendEmail in D:\Yan\Over_8\SendEmail.php on line 5, Notice: Undefined index: Name in D:\Yan\Over_8\SendEmail.php on line 6, Notice: Undefined index: Email...
9
3280
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 function are of type int. (My question has nothing to do with the definition of the function foo, so don't bother about it.) If I call the function as: foo(2,3,4,5,6,7,8);/*More arguments than expected*/
34
2994
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 main. Please help me calarifying this. The code may be of the form. int f(); int x = f();
3
4315
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 in \anmeldung2.cfm: line 404
4
2774
by: nickyspace | last post by:
HI all I have a little issue with this php code. Below is the code CODE: PHP 1.<?
9
2382
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 its prototype. Let's say for instance : foo.c #include <stdio.h>
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10391
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10121
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.