|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60606 Add a `set_ini_file()` function to load user configuration file.
Submitted: 2011-12-25 13:21 UTC Modified: 2015-04-07 19:21 UTC
Avg. Score:3.8 ± 1.6
Reproduced:8 of 11 (72.7%)
Same Version:4 (50.0%)
Same OS:1 (12.5%)
From: contact at omeid dot me Assigned:
Status: Wont fix Package: PHP options/info functions
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
11 + 27 = ?
Subscribe to this entry?

 [2011-12-25 13:21 UTC] contact at omeid dot me
There is `set_ini()` that can be used to change value of a given configuration 
option and for CGI or Fast-CGI users .user.ini file can be used to override the 
desired configuration options. but there is nothing when you use PHP as a 
server module.

Please add a `set_ini_file($path_to_user_ini);` function.

Expected result:
Here is a bare minimum example code in PHP:

function ini_set_file($ini_file) {
	foreach(parse_ini_file($ini_file) as $option => $newvalue){
		ini_set($option, $newvalue);



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 19:21 UTC]
-Status: Open +Status: Wont fix
 [2015-04-07 19:21 UTC]
That wouldn't make sense. Many ini settings can't be set from a
script for security reasons. So a set_ini_file() would either have
to ignore many settings, or it might open a back- door for
malicious code to change settings that shouldn't be changed.

Furthermore, there are most likely technical issues preventing some
ini settings to be changed in a running engine.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Sep 24 15:01:23 2020 UTC