Req #60606 [Opn->Wfx]: Add a `set_ini_file()` function to load user configuration file.

From: Date: Tue, 07 Apr 2015 19:21:33 +0000
Subject: Req #60606 [Opn->Wfx]: Add a `set_ini_file()` function to load user configuration file.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191887@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60606&edit=1 ID: 60606 Updated by: cmb@php.net Reported by: contact at omeid dot me Summary: Add a set_ini_file() function to load user configuration file. -Status: Open +Status: Wont fix Type: Feature/Change Request Package: PHP options/info functions Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2011-12-25 13:21:09] contact at omeid dot me Description: ------------ 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); } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60606&edit=1

« previous php.bugs (#191887) next »