php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38611 Call to undefined function mail()
Submitted: 2006-08-27 01:04 UTC Modified: 2006-08-27 15:17 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:0 of 1 (0.0%)
From: ole at gidderikke dot no Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.1.5 OS: Debian GNU/Linux 3.1 (sarge)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ole at gidderikke dot no
New email:
PHP Version: OS:

 

 [2006-08-27 01:04 UTC] ole at gidderikke dot no
Description:
------------
Fatal error: Call to undefined function mail() in /path/file.php on line 1

Reproduce code:
---------------
php-script:
$headers = "From: $name <$frommail>\n";
$mailtext = "Text for the mail.";
mail($tomail, "Subject for the mail", $mailtext, $headers);

php.ini (the path is correct):
sendmail_path = "/var/qmail/bin/qmail-inject"

Expected result:
----------------
I expect that PHP will find it's mail()-function. All this code and php.ini worked in earlier versions (not with) than PHP 5.1.4. I don't remember wich version, but I guess it was ~5.1.2. Version running now: 5.1.6 (not 5.1.5).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-27 15:17 UTC] bjori@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

From php.net/mail:

Requirements

For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC