|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8081 mail function fails (returns undef)
Submitted: 2000-12-02 21:32 UTC Modified: 2000-12-08 07:08 UTC
From: aksuska at webflyer dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.3pl1 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: aksuska at webflyer dot com
New email:
PHP Version: OS:


 [2000-12-02 21:32 UTC] aksuska at webflyer dot com
test Script:
        $test_var = mail( "", "Hi 
does this work?", "It is if you see this!" );
        print "The result is: $test_var";   
No mail is sent, no error reported ($test_var is empty), 
nothing in syslogs. I also tried:
$fp = popen('/usr/sbin/sendmail -t', 'w'); 
if($fp) {
fputs($fp, "To:\n"); 
fputs($fp, "Subject: test\n\n"); 
fputs($fp, "Test of PHP manual mailer"); 
fputs($fp, "\n"); 
print "The result is: $test_var";
else {
print "Can't open sendmail!";
Which does not print the error message "can't open" 
nor sends an email (nothing in syslogs). Sendmail is 
indeed working, and works without error in Perl:
open MAIL, "| /usr/lib/sendmail -t" # etc.

BTW, I have the exact same problem on my LinuxPPC 
(basically RH) machine.

Please help. Had no problem with earlier versions (last 
was 4.01pl2, I believe), just started when installed 

Location of sendmail: /usr/lib/sendmail
sendmail_path (php.ini): /usr/lib/

--with-config-file-path=/site/etc --enable-magic-quotes 
--with-dbase --with-gdbm=/usr/local 
--with-mysql=/usr/local --with-gd=/usr/local 
--with-jpeg-dir=/usr/local --with-ttf=/usr/local 
--enable-calendar --enable-memory-limit 
--enable-trans-sid --enable-bcmath --with-mcrypt 
--with-mhash --with-zlib --with-ftp --enable-wddx 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-03 19:07 UTC]
Have you tried leaving that sendmail path empty? If not
try adding ;  (commenting it) in front of it in php.ini.

 [2000-12-08 07:08 UTC]
The default php.ini entry for sendmail_path is:

sendmail_path = 'sendmail -t -i'

So you should have used:

sendmail_path = '/usr/lib/sendmail -t -i'

(or some other arguments)

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 20 20:03:33 2021 UTC