php.net |  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
Votes:9
Avg. Score:4.3 ± 0.8
Reproduced:7 of 7 (100.0%)
Same Version:4 (57.1%)
Same OS:5 (71.4%)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
Description:
------------
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
http://bugs.php.net/bug.php?id=45114

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


Patches

PHPINIScanDir.patch (last revision 2014-06-05 17:41 UTC by tyrael@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-02 02:47 UTC] sriram dot natarajan at gmail dot com
hi
 here is the patch to address this issue
http://cr.opensolaris.org/~sn123202/php53-47871.patch
http://cr.opensolaris.org/~sn123202/php52-47871.patch

let me know with your comments..
 [2009-04-29 00:01 UTC] dsp@php.net
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] pajoye@php.net
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] jani@php.net
-Package: Feature/Change Request +Package: PHP options/info functions
 [2011-02-02 22:04 UTC] tyra3l at gmail dot com
poke

Tyrael
 [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.

Tyrael
 [2011-02-08 03:29 UTC] srinatar@php.net
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] dsp@php.net
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] tyrael@php.net
the links to the patch did not work anymore, I've found it on web.archive.org, attaching it now.
for the record this still applies cleanly (tested it on PHP-5.6)
 [2014-06-05 17:41 UTC] tyrael@php.net
The following patch has been added/updated:

Patch Name: PHPINIScanDir.patch
Revision:   1401990067
URL:        https://bugs.php.net/patch-display.php?bug=47871&patch=PHPINIScanDir.patch&revision=1401990067
 [2017-10-24 07:10 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: dsp +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 08:01:30 2019 UTC