PHP mail() function does not work by default

Bug #10656 reported by Alex Hudson
4
Affects Status Importance Assigned to Milestone
php4 (Ubuntu)
Invalid
Medium
Thom May

Bug Description

I have a PHP site which sends emails; unfortunately all calls to mail() return
FALSE (i.e., the mail could not be sent).

/var/log/apache2/error.log contains:

    sh: line 1: -t: command not found

I had not changed the php.ini for Apache2 from the default setting; I presume
the above error is because it's not running "sendmail -t -i" (the default)
correctly. I have modified postfix slightly; I disabled ipv6 on my machine and
had to remove that interface from master.cf in order for postfix to run
successfully.

Bizarrely, setting the sendmail parameter in php.ini to the "default" (i.e., to
"sendmail -t -i") makes this problem go away.

Revision history for this message
Matt Zimmerman (mdz) wrote :

What version of the package are you using? This sounds somewhat similar to bug
#8356
.

Revision history for this message
Alex Hudson (bugs-alexhudson) wrote :

(In reply to comment #1)
> What version of the package are you using? This sounds somewhat similar to bug
> #1600.

No, it's not #1600 - the mail function is defined and working (it returns
FALSE), but it doesn't actually manage to send any mail.

The package libapache2-mod-php4 appears to be affected, php4 does not. I'm using
4.3.8-3ubuntu7 (for both packages; they're installed on different machines).

Revision history for this message
Thom May (thombot) wrote :

Works fine on hoary, setting the full path in php.ini is a reasonable workaround
for warty.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.