sniper Sat Jun 9 11:44:08 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/standard info.c info.h basic_functions.c
Log:
MFH:- Added php_ini_loaded_file() function which returns the path to the
actual
php.ini in use.
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.772&r2=1.2027.2.547.2.773&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.772 php-src/NEWS:1.2027.2.547.2.773
--- php-src/NEWS:1.2027.2.547.2.772 Sat Jun 9 08:38:44 2007
+++ php-src/NEWS Sat Jun 9 11:44:07 2007
@@ -3,6 +3,8 @@
?? ??? 2007, PHP 5.2.4
- Improved fix for MOPB-03-2007. (Ilia)
- Corrected fix for CVE-2007-2872. (Ilia)
+- Added php_ini_loaded_file() function which returns the path to the actual
+ php.ini in use. (Jani)
- Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
- Added missing open_basedir checks to CGI. (anight at eyelinkmedia dot com,
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.249.2.10.2.12&r2=1.249.2.10.2.13&diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.249.2.10.2.12
php-src/ext/standard/info.c:1.249.2.10.2.13
--- php-src/ext/standard/info.c:1.249.2.10.2.12 Thu Jun 7 09:07:36 2007
+++ php-src/ext/standard/info.c Sat Jun 9 11:44:08 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.249.2.10.2.12 2007/06/07 09:07:36 tony2001 Exp $ */
+/* $Id: info.c,v 1.249.2.10.2.13 2007/06/09 11:44:08 sniper Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1170,6 +1170,18 @@
}
/* }}} */
+/* {{{ proto string php_ini_loaded_file(void)
+ Return the actual loaded ini filename */
+PHP_FUNCTION(php_ini_loaded_file)
+{
+ if (php_ini_opened_path) {
+ RETURN_STRING(php_ini_opened_path, 1);
+ } else {
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.h?r1=1.38.2.1.2.4&r2=1.38.2.1.2.5&diff_format=u
Index: php-src/ext/standard/info.h
diff -u php-src/ext/standard/info.h:1.38.2.1.2.4
php-src/ext/standard/info.h:1.38.2.1.2.5
--- php-src/ext/standard/info.h:1.38.2.1.2.4 Thu Feb 8 16:55:34 2007
+++ php-src/ext/standard/info.h Sat Jun 9 11:44:08 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.h,v 1.38.2.1.2.4 2007/02/08 16:55:34 helly Exp $ */
+/* $Id: info.h,v 1.38.2.1.2.5 2007/06/09 11:44:08 sniper Exp $ */
#ifndef INFO_H
#define INFO_H
@@ -66,6 +66,7 @@
PHP_FUNCTION(php_sapi_name);
PHP_FUNCTION(php_uname);
PHP_FUNCTION(php_ini_scanned_files);
+PHP_FUNCTION(php_ini_loaded_file);
PHPAPI char *php_info_html_esc(char *string TSRMLS_DC);
PHPAPI void php_info_html_esc_write(char *string, int str_len TSRMLS_DC);
PHPAPI void php_print_info_htmlhead(TSRMLS_D);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.53&r2=1.725.2.31.2.54&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.53
php-src/ext/standard/basic_functions.c:1.725.2.31.2.54
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.53 Tue May 22
15:38:27 2007
+++ php-src/ext/standard/basic_functions.c Sat Jun 9 11:44:08 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.31.2.53 2007/05/22 15:38:27 bjori Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.54 2007/06/09 11:44:08 sniper Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -1765,6 +1765,10 @@
static
ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0)
ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0)
+ZEND_END_ARG_INFO()
/* }}} */
/* {{{ iptc.c */
static
@@ -3132,6 +3136,7 @@
PHP_FE(php_sapi_name,
arginfo_php_sapi_name)
PHP_FE(php_uname,
arginfo_php_uname)
PHP_FE(php_ini_scanned_files,
arginfo_php_ini_scanned_files)
+ PHP_FE(php_ini_loaded_file,
arginfo_php_ini_loaded_file)
PHP_FE(strnatcmp,
arginfo_strnatcmp)
PHP_FE(strnatcasecmp,
arginfo_strnatcasecmp)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php