我使用PHP 7.3:
PHP Version 7.3.11-1+ubuntu18.04.1+deb.sury.org+1
Server API FPM/FastCGI
并且我需要为不同的虚拟主机(应用程序)使用不同的sendmail配置。
我尝试使用.user.ini
文件来配置PHP参数:
sendmail_from="[email protected]"
sendmail_path="/usr/bin/agent -c profile1"
如果使用PHP-FPM,如何为不同的虚拟主机/应用程序配置不同的sendmail_path
参数?
sendmail_path
是PHP_INI_SYSTEM类设置,在FPM池配置中是php_admin_value[]
。而sendmail_from
是标准的PHP_INI_ALL选项。
因此,您不能基于.user.ini /目录或ini_set()
覆盖sendmail二进制设置。