PHP CLI does not use additional .ini files

I can not find the answer about why, when I run PHP from the CLI, the additional ini file options are set to none. I know that when I use the -c flag, I can specify a specific configuration file to load, however I could not find a flag to specify the directory for loading ini files. Is there a flag for this? Or is there a file that I can edit to indicate the location of the ini directory?

This is where php -i works:

 Configuration File (php.ini) Path: /usr/local/lib Loaded Configuration File: /usr/local/lib/php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none) 
+4
source share
1 answer

You need to recompile PHP to enable this, for example:

 ./configure ... --with-config-file-scan-dir=/etc/php.d 
+3
source

All Articles