0

I use PHP 7.3:

PHP Version 7.3.11-1+ubuntu18.04.1+deb.sury.org+1
Server API  FPM/FastCGI

and I need to have different sendmail configurations for different virtual hosts (applications).

I try to use .user.ini file to configure PHP parameters:

sendmail_from="user@domain.com"
sendmail_path="/usr/bin/agent -c profile1"

First parameter is overridden, but second one isn't: enter image description here

How can I configure different sendmail_path parameters for different virtualhosts/apps if I use PHP-FPM?

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
Alex Gusev
  • 1,526
  • 3
  • 16
  • 35

1 Answers1

2

The sendmail_path is a PHP_INI_SYSTEM class setting, and a php_admin_value[] in the FPM pool configuration.
Whereas sendmail_from is a standard PHP_INI_ALL option.

Thus you can't override the sendmail binary setting on a .user.ini / directory basis, nor per ini_set().

mario
  • 144,265
  • 20
  • 237
  • 291