Does this tell the PHP binary to do a file system scan every time the PHP module is loaded to respond to a request?
No. When you compile --with-config-file-scan-dir=/path/to/dir
all you're doing is telling PHP combine all files in this directory into its configuration. This is a method often used in system configuration where package management systems need to be able to add/remove package specific configuration from an application without potentially destroying a end-user modified config file. An example here would be, on a Debian based system, when you apt-get install php-pgsql
, it will create a /etc/php/conf.d/pgsql.ini
which will contain the extension=pgsql.so
line, as well as any module-specific options.
Does enabling the configuration option with-config-file-scan-dir when compiling PHP lead to performance issues?
Not really. In practice, it is simply a concatenation of all the .ini files in that particular directory.
I can tell you that Debian, CentOS, and Zend Server all use this option by default.
Also, just off the top of my head, *nix RC files, Apache2, Courier, Emacs, and Cron all use (or can use) similar approaches to loading configurations.