Share

XML-RPC for PHP

File Release Notes and Changelog

Release Name: 2.1

Notes:
This release corrects quite a few bugs and adds some interesting new features.
There is a minor security enhancement and overall speedup too.

It has been tested with PHP 4.0.5 up to 4.4.4 and 5.1.5.
Please note that 404pl1 is NOT supported, and has not been since 2.0.

*** PLASE READ CAREFULLY BELOW ***

CHANGES THAT MIGHT AFFECT DEPLOYED APPLICATIONS:

The wrap_php_function and wrap_xmlrpc_method functions have been moved out of
the base library file xmlrpc.inc into a file of their own: xmlrpc_wrappers.inc.
You will have to include() / require() it in your scripts if you have been using
those functions.

For increased security, the automatic rebuilding of php object instances out of
received xmlrpc structs in wrap_xmlrpc_method() has been disabled (but it can be
optionally reenabled).

The constructor of xmlrpcval() values has seen major changes, and it will not
throw a php warning anymore when invoked using an unknown xmlrpc type: the
error will only be written to php error log. Also new xmlrpcval('true', 'boolean')
is not supported anymore.

MAJOR IMPROVEMENTS:

The new function php_xmlrpc_decode_xml() will take the xml representation of
either an xmlrpc request, response or single value and return the corresponding
php-xmlrpc object instance.

Both wrap_php_function() and wrap_xmlrpc_method() functions accept many more
options to fine tune their behaviour, including one to return the php code to
be saved and later used as standalone php script.

A new function wrap_xmlrpc_server() has been added, to wrap all (or some) of the
methods exposed by a remote xmlrpc server into a php class.

Lib internals have been modified to provide better support for grafting extra
functionality on top of it. Stay tuned for future releases of the EXTRAS package.

Last but not least a new file has been added: verify_compat.php, to help users
diagnose the level of compliance of the current php install with the library.


Changes: * fixed bug 1311927: client not playing nice with some proxy/firewall on ports != 80 * fixed bug 1334340: all ereg_ functions have been replaced with corresponding preg_ * fixed bug: wrong handling of 'deflate' http encoding, both server and client side * fixed bug: sending compressed responses when php output compression is enabled was not working * fixed bug: addarray() and addstruct() where not returning 1 when adding data to already initialized values * fixed bug: non-ascii chars used in struct element names where not being encoded correctly * restored compatibility with php 4.0.5 (for those poor souls still stuck on it) * server->service() now returns either the payload or xmlrpcresp instance * server->add_to_map() now accepts methods with no param definitions * added new function: php_xmlrpc_decode_xml() * added new function: wrap_xmlrpc_server() * major improvements and security enhancements to wrap_php_function() and wrap_xmlrpc_method() * documentation for single parameters of exposed methods can be added to the dispatch map (and turned into html docs in conjunction with a future release of the extras package) * full response payload is saved into xmlrpcresp object for further debugging * stricter parsing of incmoing xmlrpc messages: two more invalid cases are now detected (double data element inside array and struct/array after scalar inside value element) * debugger can now generate code that wraps a remote method into php function (works for jsonrpc, too) * debugger has better support for being activated via a single GET call (for integration into other tools?) * more logging of errors in a lot of situations * javadoc documentation of lib files almost complete * the usual amount of new testcases in the testsuite * many performance tweaks and code cleanups * added foundation for emulating the API of the xmlrpc extension (extras package needed)