-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configuration dirs #77
Comments
Yeah, I agree - I think that's a good way to go with it. It does seem more like a primary thing to have rather than an "option" per se. |
@mfn any chance you could whip this up in a PR? :) I think it'd be a great addition to the tool. |
Issue not relevant to me anymore 🤷♀️ => closing |
@mfn but maybe for others ;) please reopen |
The thing is for Apache HTTP Server for example you have an include statement like Also it's important to note that ini files in TL;DRRight now the workaround is: Information about how php.ini loads extra files[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (usually C:\windows)
; See the PHP docs for more specific information.
; http://php.net/configuration.file |
PHP has a setting, which set by default on e.g. Debian/Ubuntu, to load additional configuration files.
Looking at the output of
iniscan scan --help
I don't see an easy way to mimic this behavior quickly.Suggestion: let
--path
also accept a directory by automatically reading all*.ini
files in there; that's how PHP itself worksAnother observation / suggestion:
Since providing a file/dir (=path) is essentially the required thing to perform anything useful I would suggest to simply drop
--path
option and use Symfonys arguments which don't require that prefix, effectively turninginiscan scan --path foo.ini
intoiniscan scan foo.ini
This would also allow it easier to specify multiple filers, e.g.
iniscan scan /etc/php5/cli/conf.d/*.ini
The text was updated successfully, but these errors were encountered: