php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20367 mail() function does not work
Submitted: 2002-11-11 13:52 UTC Modified: 2002-11-21 17:16 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: jstotler1 at earthlink dot net Assigned:
Status: No Feedback Package: Mail related
PHP Version: 4.2.3 OS: OSX 10.2.1
Private report: No CVE-ID: None
 [2002-11-11 13:52 UTC] jstotler1 at earthlink dot net
I am running Apache 1.3.26 and php 4.2.3 on OSX 10.2.1

I have created the /usr/lib/php.ini file, and verified that changes to it are reflected in phpinfo(). The path to sendmail is set correctly.

Sendmail functions properly, and I have alleviated the various permissions issues related to sendmail on OSX, as I have been using this box as a mail server for months now.

This simple bit of scripting fails:

mail("realaddress@earthlink.net", "My Subject", "Line 1\nLine 2\nLine 3");

There are no errors reported in the browser or in error_log, so there is no indication of failure, other than the fact that the email is never recieved.

I have found dozens of similar posts in newsgroups and in web forums, but noone has yet found the answer. Searching your online KnowledgeBase and Bug DB come up with no mentions either.

If there is any further information or debugging that I can provide, please let me know.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-11 14:36 UTC] msopacua@php.net
So, what does '/var/log/maillog' tell you?
 [2002-11-18 09:21 UTC] fab at fluxus dot net
I'v got the same problem on a linux redhat,apache 1.3.27 and php 4.2.3; and /var/log/maillog tell nothing, the mail don't arrive to sendmail.
I tried to compile php as a binary (not as an apache module) and in this case, the mail functions works fine.
I think this bug is resolved in cvs version, but its for a production environment, so cvs isn't a solution for me.

I tried to replace mail.c and php_mail.c with the cvs version in 4.2.3 source. All compile fine, but apache refuse to start due to undefined symbol :
Cannot load /usr/local/apache/apache_1.3.27/libexec/libphp4.so into server: /usr/local/apache/apache_1.3.27/libexec/libphp4.so: undefined symbol: php_error_docref
/opt/apache/apache_1.3.27/bin/apachectl start: httpd could not be started

Can I find a patch somewhere for the mail.c function for php 4.2.3 ?
thanks
 [2002-11-19 13:22 UTC] jjlochn at lirr dot org
Apache 1.3.27/PHP 4.2.3 on Mandrake Linux 8.2
Same problem here.  Previously running PHP 4.1.2 caused a message to be logged by sendmail but no message delivered.  Relay agent showed as apache@localhost.

Moved to PHP 4.2.3 now nothing shows up in log file. php.ini is using "/usr/sbin/sendmail -t -i". No luck
 [2002-11-21 17:16 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 07:01:28 2024 UTC