|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #47871 PHPIniScanDir directive for apache allows scanning for extension ini files
Submitted: 2009-04-02 02:28 UTC Modified: 2017-10-24 07:10 UTC
Avg. Score:4.2 ± 0.9
Reproduced:6 of 7 (85.7%)
Same Version:3 (50.0%)
Same OS:4 (66.7%)
From: sriram dot natarajan at gmail dot com Assigned:
Status: Open Package: PHP options/info functions
PHP Version: 5.3.0RC1 OS: unix and linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sriram dot natarajan at gmail dot com
New email:
PHP Version: OS:


 [2009-04-02 02:28 UTC] sriram dot natarajan at gmail dot com
Provide PHPIniScanDir directive similar to PHPIniDir for apache. this directive can perform the functionality of PHP_INI_SCAN_DIR environment variable. 

for more information on what PHP_INI_SCAN_DIR, please refer to bug

Expected result:
PHPIniScanDir directive should be accepted and php should load extension specific ini files from this location


PHPINIScanDir.patch (last revision 2014-06-05 17:41 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-02 02:47 UTC] sriram dot natarajan at gmail dot com
 here is the patch to address this issue

let me know with your comments..
 [2009-04-29 00:01 UTC]
I think that's a good one. I assign it to me so that we don't forget about that one.
 [2009-05-04 15:12 UTC]
David, what's the status about this one? Should it not be for all SAPI instead?
 [2009-05-04 18:19 UTC] sriram dot natarajan at gmail dot com
how does this work ? will this need to be ported all the sapi's currently supported by PHP or can it be on a user request basis ? for, example - i can provide the patch for ISAPI ? will that help ? 

For NSAPI, lot of things are broke as is. for example, php ini dir itself does not work with recent version of sun web server. I plan to  file a separate bug for NSAPI and can provide a separate patch to address this issue for nsapi.  

I don't have lot of experience with thttpd or roxen. Does this patch need to be ported to those SAPI's as well ? are these SAPI's actively used by the community ?
 [2011-01-23 21:16 UTC]
-Package: Feature/Change Request +Package: PHP options/info functions
 [2011-02-02 22:04 UTC] tyra3l at gmail dot com

 [2011-02-02 23:34 UTC] tyra3l at gmail dot com
for the record: passing PHP_INI_SCAN_DIR through SetEnv from apache confid doesnt 
work: the environment variable will be there(at least by phpinfo()), but the "Scan 
this dir for additional .ini files" will be empty.
on the other hand, if you set/export an environment variable in the shell where 
you start the apache afterwards, that does work.
so for now, one can set this option "runtime", but it would be a nicer solution, 
if the apache SetEnv would work, or if the patch would be merged, so we would have 
an apache directive called PHP_INI_SCAN_DIR.

 [2011-02-08 03:29 UTC]
i believe, with my initial patch the idea was that introduce a directive like PhpIniScanDir within httpd.conf so that this can scan a directory.
 [2012-11-16 05:52 UTC]
Sriram, sorry for totally having forgotten about that patch. I think we might be 
able to add it to 5.5.0 if someone pushes for it. I yet have to test if the patch 
works with 5.5.0
 [2014-06-05 17:40 UTC]
the links to the patch did not work anymore, I've found it on, attaching it now.
for the record this still applies cleanly (tested it on PHP-5.6)
 [2014-06-05 17:41 UTC]
The following patch has been added/updated:

Patch Name: PHPINIScanDir.patch
Revision:   1401990067
 [2017-10-24 07:10 UTC]
-Status: Assigned +Status: Open -Assigned To: dsp +Assigned To:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 21:01:29 2024 UTC