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

Home Posts Topics Members FAQ

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...hopi ng I won't have to reinstall PHP...the
process is still a little scary for me.

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

Savut

"A. Name" <or****@hotmail .com> wrote in message
news:d1******** *************** **@posting.goog le.com...
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...hopi ng 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******* *************@n ews20.bellgloba l.com>...
You have to define sendmail_path in php.ini

Savut

"A. Name" <or****@hotmail .com> wrote in message
news:d1******** *************** **@posting.goog le.com...
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...hopi ng 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...hopi ng 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3044
by: CoralineSage | last post by:
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
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
9603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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
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.