php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14972 Setting 'sendmail_path' leads to PHP not find sendmail
Submitted: 2002-01-10 11:55 UTC Modified: 2002-01-21 12:31 UTC
From: fuerst at mac dot com Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 4.1.1 OS: MacOS 10.1.2 (Darwin 5.2)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fuerst at mac dot com
New email:
PHP Version: OS:

 

 [2002-01-10 11:55 UTC] fuerst at mac dot com
If 'sendmail_path' is set in the php.ini like this:
sendmail_path = 'sendmail -t -i'

I get the following error in the Apache error log: 
zsh: no such file or directory: /usr/sbin/sendmail -t -i

If I run /usr/sbin/sendmail -t -i manually from the zsh it works but if I surround it by quotation marks I get the same error.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-20 18:33 UTC] markonen@php.net
sendmail_path is only for setting the path to the sendmail 
executable. You can't set command line parameters for 
sendmail with it. To supply command line parameters, use 
the fifth parameter to the mail() function, documented at 
http://www.php.net/mail.
 [2002-01-21 03:35 UTC] mfischer@php.net
A note to the submitter:
since sendmail_path defaults to 'sendmail -t -i', leaving it out should be ok for you.

I'm opening this, because the PHP.INI clearly says:
";for unix only, may supply arguments as well (default is 'sendmail -t -i')"

Either way, it is a bug (doc or something else)
 [2002-01-21 08:14 UTC] fuerst at mac dot com
> since sendmail_path defaults to 'sendmail -t -i', 
> leaving it out should be ok for you

The above setting was just an example...

In real: My intranet domain is named unusual so I want to set the envelope sender to something real by using the '-f' switch. Some smtp servers outside will return an error like "domain unknown" if the envelope sender domain is named incorrect.

 [2002-01-21 12:31 UTC] markonen@php.net
Okay, I just need to learn to read better. The problem is 
that php only supports enclosing php.ini parameters in 
double, not single quotes. So "sendmail -t -i" should work 
fine. The configuration page in the manual should probably 
mention this explicitly, but I think it's quite clear as-
is.

I'm correcting the example in the ini files and closing.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 02:01:23 2020 UTC