summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2002-10-06 17:04:10 +0000
committerRasmus Lerdorf <rasmus@php.net>2002-10-06 17:04:10 +0000
commitf32d63a3b31003f07a3b69b5c94aa8e93548ca32 (patch)
treef7941a8f11040ebc40ddd151c0f4c97ceae44944
parentaf14a8e75f40c20f5c8f0ba29d121f2b286559bf (diff)
downloadphp-git-f32d63a3b31003f07a3b69b5c94aa8e93548ca32.tar.gz
Add php_ini_scanned_files() so "make test" can tell you when you have
additional .ini files that are scanned.
-rw-r--r--ext/standard/basic_functions.c1
-rw-r--r--ext/standard/info.c9
-rw-r--r--ext/standard/info.h1
-rwxr-xr-xrun-tests.php1
4 files changed, 12 insertions, 0 deletions
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()) . "
=====================================================================
";