cvs: php4 / NEWS /main main.c php_globals.h
| From: | Sascha Schumann | Date: | Tue, 10 Jul 2001 15:59:34 +0000 |
| Subject: | cvs: php4 / NEWS /main main.c php_globals.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6151@lists.php.net to get a copy of this message | ||
sas Tue Jul 10 11:59:34 2001 EDT
Modified files:
/php4 NEWS
/php4/main main.c php_globals.h
Log:
Allow errors to be returned as XMLRPC fault packets.
Submitted by: Matt Allen <matt@investigationmarketplace.com>
Index: php4/NEWS
diff -u php4/NEWS:1.701 php4/NEWS:1.702
--- php4/NEWS:1.701 Tue Jul 10 10:35:25 2001
+++ php4/NEWS Tue Jul 10 11:59:32 2001
@@ -1,7 +1,8 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.0.7-dev
-- Improve range() function to support range('a','z') and range(9,0) types
+- Added option for returning XMLRPC fault packets (Matt Allen, Sascha Schumann)
+- Improved range() function to support range('a','z') and range(9,0) types
of ranges. (Rasmus)
- Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
a gid check instead of a uid check. (James E. Flemer, Rasmus)
Index: php4/main/main.c
diff -u php4/main/main.c:1.372 php4/main/main.c:1.373
--- php4/main/main.c:1.372 Mon Jul 9 13:36:04 2001
+++ php4/main/main.c Tue Jul 10 11:59:33 2001
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.372 2001/07/09 17:36:04 rasmus Exp $ */
+/* $Id: main.c,v 1.373 2001/07/10 15:59:33 sas Exp $ */
/* {{{ includes
*/
@@ -202,6 +202,8 @@
STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("expose_php", "1", PHP_INI_SYSTEM, OnUpdateBool, expose_php, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("html_errors", "1", PHP_INI_SYSTEM, OnUpdateBool, html_errors, php_core_globals, core_globals)
+ STD_PHP_INI_BOOLEAN("xmlrpc_errors", "0", PHP_INI_SYSTEM, OnUpdateBool, xmlrpc_errors, php_core_globals, core_globals)
+ STD_PHP_INI_ENTRY("xmlrpc_error_number", "0", PHP_INI_ALL, OnUpdateString, xmlrpc_error_number, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("ignore_user_abort", "0", PHP_INI_ALL, OnUpdateBool, ignore_user_abort, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("implicit_flush", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateBool, implicit_flush, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("log_errors", "0", PHP_INI_ALL, OnUpdateBool, log_errors, php_core_globals, core_globals)
@@ -400,12 +402,20 @@
error_format = PG(html_errors) ?
"<br>\n<b>%s</b>: %s in <b>%s</b> on line
<b>%d</b><br>\n"
: "\n%s: %s in %s on line %d\n";
+ if (PG(xmlrpc_errors)) {
+ error_format = do_alloca(1024);
+ snprintf(error_format, 1023 , "<?xml
version=\"1.0\"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>%d</int></value></member><member><name>faultString</name><value><string>%%s:%%s
in %%s on line
%%d</string></value></member></struct></value></fault></methodResponse>",
PG(xmlrpc_error_number));
+ }
if (prepend_string) {
PUTS(prepend_string);
}
php_printf(error_format, error_type_str, buffer,
error_filename, error_lineno);
+ if (PG(xmlrpc_errors)) {
+ free_alloca(error_format);
+ }
+
if (append_string) {
PUTS(append_string);
}
Index: php4/main/php_globals.h
diff -u php4/main/php_globals.h:1.64 php4/main/php_globals.h:1.65
--- php4/main/php_globals.h:1.64 Mon Jul 9 13:36:04 2001
+++ php4/main/php_globals.h Tue Jul 10 11:59:33 2001
@@ -123,6 +123,10 @@
zend_bool y2k_compliance;
zend_bool html_errors;
+ zend_bool xmlrpc_errors;
+
+ short xmlrpc_error_number;
+
zend_bool modules_activated;