php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71901 mail.force_extra_parameters is not PHP_INI_PERDIR
Submitted: 2016-03-25 17:36 UTC Modified: 2025-11-29 13:28 UTC
Votes:6
Avg. Score:4.2 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: slfyst at gmail dot com Assigned: bukka (profile)
Status: Closed Package: Mail related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2016-03-25 17:36 UTC] slfyst at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/mail.configuration
---

The above page states that mail.force_extra_parameters is changeable by PHP_INI_PERDIR. However I find this not to be the case, it looks like it's php.ini only.

Also, this page states that mail.force_extra_parameters is changeable by php.ini only, which contradicts the above page: http://php.net/manual/en/ini.list.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 13:50 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: Mail related -Assigned To: +Assigned To: stas
 [2017-01-28 13:50 UTC] cmb@php.net
Actually, mail.force_extra_parameters is declared as
PHP_INI_SYSTEM|PHP_INI_PERDIR[1], but OnChangeMailForceExtra()[2]
prevents it from being changed in .htaccess (not sure whether
changing it in httpd.conf and .user.ini is allowed or not).

The respective restriction has been introduced as of PHP 5.2.0,
with commit cd836153[3].

Stas, can you please clarify whether changing in httpd.conf and
.user.ini is allowed or not, and then assign this ticket to me.

[1] <https://github.com/php/php-src/blob/PHP-7.1.1/main/main.c#L601>
[2] <https://github.com/php/php-src/blob/PHP-7.1.1/main/main.c#L492-L499>
[3] <https://github.com/php/php-src/commit/cd836153>
 [2017-10-24 05:10 UTC] kalle@php.net
-Status: Verified +Status: Assigned
 [2017-10-24 05:12 UTC] kalle@php.net
-Type: Documentation Problem +Type: Bug
 [2020-11-01 14:30 UTC] raymond at steffann dot nl
The change that prevented mail.force_extra_parameters configured from .htaccess 
https://github.com/php/php-src/commit/cd836153
 [2025-11-29 13:28 UTC] bukka@php.net
-Assigned To: stas +Assigned To: bukka
 [2025-11-29 13:28 UTC] bukka@php.net
I just had a look and don't think there is much to do here as the docs got updated to reflect the current behavior that it is PHP_INI_SYSTEM (in reality it's PHP_INI_PERDIR but with prohibited .htaccess as noted but document it this way is less confusing) and it can be still changed from httpd.conf or in this case FPM php_value should work as well.

There was likely a good reason why it got disabled but if anyone thinks that it was a mistake to disallow it in .htaccess, then please create a new feature request to change it.
 [2025-11-29 13:28 UTC] bukka@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 19 18:00:02 2025 UTC