|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-05-20 09:04 UTC] bugs dot php dot net at phoenixdigital dot com
Description: ------------ Hi, We are having trouble getting emails sent from php to set the return-path header in messages. This is important as we host many sites from our servers and want bounces to go to the hosted sites address rather than our system address. adding this line to the virtual host section in the apache conf. php_value sendmail_path '/usr/sbin/sendmail -t -i -f cameron@phoenixdigital.com' then checking the a page with phpinfo() in it the change is not visible. We can set this value in the php.ini file perfectly but however we cannot set it on a site by site basis in the virtual hosts directive. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
This is not a bug, but meant to work like this due to security reasons. (Ie, we don't want people to be able to configure their own sendmail path in .htaccess files). The correct way of doing what you want is to use the php_admin_value mail.force_extra_parameters setting, which is configurable per vhost.. unfortunately that only works in PHP 5 (dev). If you are comfortable patching, you can apply the following patch to php 4.3.6 (it should also apply to 4.3.4): Index: main/main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.512.2.53 diff -u -p -r1.512.2.53 main.c --- main/main.c 9 Feb 2004 04:05:56 -0000 1.512.2.53 +++ main/main.c 20 May 2004 10:26:04 -0000 @@ -356,7 +356,7 @@ PHP_INI_BEGIN() #endif PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision) PHP_INI_ENTRY("sendmail_from", NULL, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM, NULL) + PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL) PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("disable_classes", "", PHP_INI_SYSTEM, NULL) But make sure to use php_admin_value sendmail_path "your command" so that it can't be overridden from .htaccess files.