[PHP-DEV] PHP 4.0 Bug #8081: mail function fails (returns undef) From: aksuska <email protected>
Date: 12/02/00

From: aksuska <email protected>
Operating system: Solaris 2.6
PHP version: 4.0.3pl1
PHP Bug Type: *Mail Related
Bug description: mail function fails (returns undef)

test Script:
<?php
        $test_var = mail( "aksuska <email protected>", "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:
<?php
$fp = popen('/usr/sbin/sendmail -t', 'w');
if($fp) {
fputs($fp, "To: aksuska <email protected>\n");
fputs($fp, "Subject: test\n\n");
fputs($fp, "Test of PHP manual mailer");
fputs($fp, "\n");
pclose($fp);
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
403pl1.

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

Configure:
--with-apxs=/site/apache/bin/apxs
--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
--enable-ftp

-- 
Edit Bug report at: http://bugs.php.net/?id=8081&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>