473,386 Members | 1,621 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,386 software developers and data experts.

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

Similar topics

4
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.