From 989a61ed98f1865ac926d114448f0ebfa3a8ec43 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Fri, 4 Oct 2002 04:47:35 +0000 Subject: As discussed, add --with-config-file-scan-dir compile-time switch defining a directory which will be scanned for *.ini files after the main php.ini file has been parsed. This makes it much easier to automatically deploy a modular PHP since adding extensions which have their own ini switches can now be done by simply dropping a foo.ini file in the right directory and restarting. A list of parsed ini files is maintained and shown on the phpinfo page. --- ext/standard/info.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/standard/info.c') diff --git a/ext/standard/info.c b/ext/standard/info.c index 59157a5e41..8d3b76a51b 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -59,6 +59,7 @@ ZEND_EXTERN_MODULE_GLOBALS(iconv) } \ PHPAPI extern char *php_ini_opened_path; +PHPAPI extern char *php_ini_scanned_files; /* {{{ _display_module_info */ @@ -378,6 +379,13 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) #endif php_info_print_table_row(2, "Configuration File (php.ini) Path", php_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH); + + if(strlen(PHP_CONFIG_FILE_SCAN_DIR)) { + php_info_print_table_row(2, "Scan this dir for additional .ini files", PHP_CONFIG_FILE_SCAN_DIR); + if(php_ini_scanned_files) { + php_info_print_table_row(2, "additional .ini files parsed", php_ini_scanned_files); + } + } snprintf(temp_api, sizeof(temp_api), "%d", PHP_API_VERSION); php_info_print_table_row(2, "PHP API", temp_api); -- cgit v1.2.1