From f32d63a3b31003f07a3b69b5c94aa8e93548ca32 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sun, 6 Oct 2002 17:04:10 +0000 Subject: [PATCH] Add php_ini_scanned_files() so "make test" can tell you when you have additional .ini files that are scanned. --- ext/standard/basic_functions.c | 1 + ext/standard/info.c | 9 +++++++++ ext/standard/info.h | 1 + run-tests.php | 1 + 4 files changed, 12 insertions(+) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 69017e8b06..311758adf9 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -309,6 +309,7 @@ function_entry basic_functions[] = { PHP_FE(zend_logo_guid, NULL) PHP_FE(php_sapi_name, NULL) PHP_FE(php_uname, NULL) + PHP_FE(php_ini_scanned_files, NULL) PHP_FE(strnatcmp, NULL) PHP_FE(strnatcasecmp, NULL) diff --git a/ext/standard/info.c b/ext/standard/info.c index 8d3b76a51b..5e6f80ac5e 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -911,6 +911,15 @@ PHP_FUNCTION(php_uname) /* }}} */ +/* {{{ proto string php_ini_scanned_files(void) + Return comma-separated string of .ini files parsed from the additional ini dir */ +PHP_FUNCTION(php_ini_scanned_files) { + if(strlen(PHP_CONFIG_FILE_SCAN_DIR)) { + RETURN_STRING(php_ini_scanned_files,1); + } else RETURN_FALSE; +} +/* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/ext/standard/info.h b/ext/standard/info.h index d9c9d861ca..caf9f4917c 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -63,6 +63,7 @@ PHP_FUNCTION(zend_logo_guid); PHP_FUNCTION(php_egg_logo_guid); PHP_FUNCTION(php_sapi_name); PHP_FUNCTION(php_uname); +PHP_FUNCTION(php_ini_scanned_files); PHPAPI char *php_info_html_esc(char *string TSRMLS_DC); PHPAPI void php_print_info_htmlhead(TSRMLS_D); PHPAPI void php_print_info(int flag TSRMLS_DC); diff --git a/run-tests.php b/run-tests.php index 934e01899c..9b2a34af30 100755 --- a/run-tests.php +++ b/run-tests.php @@ -97,6 +97,7 @@ PHP_VERSION : " . PHP_VERSION . " PHP_OS : " . PHP_OS . " INI actual : " . realpath(get_cfg_var('cfg_file_path')) . " INI wanted : " . realpath('php.ini-dist') . " +More .INIs : " . str_replace("\n","", php_ini_scanned_files()) . " ===================================================================== "; -- 2.40.0