language: php
php:
- - 5.2
- 5.3
- 5.4
- 5.5
- hhvm
install:
- # NB: the lib does not declare dependencies for now. Also, composer will not run on php 5.2
- - if [ $TRAVIS_PHP_VERSION != "5.2" ]; then composer self-update && composer install; fi
+ - composer self-update && composer install
before_script:
# Disable xdebug. NB: this should NOT be done for hhvm...
2014-05-26 - G. Giunta (giunta.gaetano@gmail.com)
- * removed bundled php unit
+ * removed bundled phpunit
* converted all tabs to spaces in php files and removed closing tags
2014-05-12 - Samu Voutilainen (smar@smar.fi)
# recover version number from code\r
# thanks to Firman Pribadi for unix command line help\r
# on unix shells lasts char should be \\2/g )\r
-###export VERSION=$(shell grep -E "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )\r
-export VERSION=3.0.0\r
+export VERSION=$(shell grep -E "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )\r
\r
LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc\r
\r
-XML-RPC for PHP version 3.0.1 - 201X/Y/Z
+XML-RPC for PHP version 4.0.0 - 201X/Y/Z
-Taking baby steps to modern-world php, this release is now tested using Travis ( https://travis-ci.org/ ).
+This release does away with the past and starts a transition to modern-world php.
-Improved: no need to call anymore $client->setSSLVerifyHost(2) to silence a curl warning when using https with recent curl builds
+Code has been heavily refactored, taking care to preserve backwards compatibility as much as possible,
+but some breackage is to be expected.
+
+PLEASE READ CAREFULLY THE NOTES BELOW to insure a smooth upgrade.
+
+The minimum requied php version has been increase to 5.3,
+even though we stronly urge you to use more recent versions.
+
+* improved: this release is now tested using Travis ( https://travis-ci.org/ ).
+
+* improved: no need to call anymore $client->setSSLVerifyHost(2) to silence a curl warning when using https with recent curl builds
+
+* improved: phpunit is now installed via composer, not bundled anymore
XML-RPC for PHP version 3.0.0 - 2014/6/15
"homepage": "http://gggeek.github.io/phpxmlrpc/",
"keywords": [ "xmlrpc", "webservices" ],
"require": {
- "php": ">=5.1.0"
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.3.*"
},
"autoload": {
- "classmap": [ "lib/xmlrpc.inc", "lib/xmlrpcs.inc" ]
+ "classmap": [ "lib/" ]
}
}
\ No newline at end of file
return $client->send(new xmlrpcmsg($remote_function_name, $xmlrpcval_array));
}
}
-?>
-<<<<<<< HEAD
-<html>\r\r<head><title>xmlrpc</title></head>\r\r<body>\r\r<h1>Which toolkit demo</h1>\r\r<h2>Query server for toolkit information</h2>\r\r<h3>The code demonstrates usage of the php_xmlrpc_decode function</h3>\r\r<?php\r\r include("xmlrpc.inc");\r\r\r\r $f = new xmlrpcmsg('interopEchoTests.whichToolkit', array());\r\r $c = new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);\r\r $r = $c->send($f);\r\r if(!$r->faultCode())\r\r {\r\r $v = php_xmlrpc_decode($r->value());\r\r print "<pre>";\r\r print "name: " . htmlspecialchars($v["toolkitName"]) . "\n";\r\r print "version: " . htmlspecialchars($v["toolkitVersion"]) . "\n";\r\r print "docs: " . htmlspecialchars($v["toolkitDocsUrl"]) . "\n";\r\r print "os: " . htmlspecialchars($v["toolkitOperatingSystem"]) . "\n";\r\r print "</pre>";\r\r }\r\r else\r\r {\r\r print "An error occurred: ";\r\r print "Code: " . htmlspecialchars($r->faultCode()) . " Reason: '" . htmlspecialchars($r->faultString()) . "'\n";\r\r }\r\r?>\r\r</body>\r\r</html>\r\r
-=======
-<html>\r\r<head><title>xmlrpc</title></head>\r\r<body>\r\r<h1>Which toolkit demo</h1>\r\r<h2>Query server for toolkit information</h2>\r\r<h3>The code demonstrates usage of the php_xmlrpc_decode function</h3>\r\r<?php\r\rinclude("xmlrpc.inc");\r\r\r\r $f = new xmlrpcmsg('interopEchoTests.whichToolkit', array());\r\r $c = new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);\r\r $r = $c->send($f);\r\r if(!$r->faultCode())\r\r {\r\r $v = php_xmlrpc_decode($r->value());\r\r print "<pre>";\r\r print "name: " . htmlspecialchars($v["toolkitName"]) . "\n";\r\r print "version: " . htmlspecialchars($v["toolkitVersion"]) . "\n";\r\r print "docs: " . htmlspecialchars($v["toolkitDocsUrl"]) . "\n";\r\r print "os: " . htmlspecialchars($v["toolkitOperatingSystem"]) . "\n";\r\r print "</pre>";\r\r }\r\r else\r\r {\r\r print "An error occurred: ";\r\r print "Code: " . htmlspecialchars($r->faultCode()) . " Reason: '" . htmlspecialchars($r->faultString()) . "'\n";\r\r }\r\r?>\r\r<hr/>\r\r<em>$Id$</em>\r\r</body>\r\r</html>\r\r
->>>>>>> php53
+<html>\r\r<head><title>xmlrpc</title></head>\r\r<body>\r\r<h1>Which toolkit demo</h1>\r\r<h2>Query server for toolkit information</h2>\r\r<h3>The code demonstrates usage of the php_xmlrpc_decode function</h3>\r\r<?php\r\r include("xmlrpc.inc");\r\r\r\r $f = new xmlrpcmsg('interopEchoTests.whichToolkit', array());\r\r $c = new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);\r\r $r = $c->send($f);\r\r if(!$r->faultCode())\r\r {\r\r $v = php_xmlrpc_decode($r->value());\r\r print "<pre>";\r\r print "name: " . htmlspecialchars($v["toolkitName"]) . "\n";\r\r print "version: " . htmlspecialchars($v["toolkitVersion"]) . "\n";\r\r print "docs: " . htmlspecialchars($v["toolkitDocsUrl"]) . "\n";\r\r print "os: " . htmlspecialchars($v["toolkitOperatingSystem"]) . "\n";\r\r print "</pre>";\r\r }\r\r else\r\r {\r\r print "An error occurred: ";\r\r print "Code: " . htmlspecialchars($r->faultCode()) . " Reason: '" . htmlspecialchars($r->faultString()) . "'\n";\r\r }\r\r?>\r\r</body>\r\r</html>\r\r
\ No newline at end of file
// just sends back a string
$s=$m->getParam(0);
$v = $s->scalarval();
-file_put_contents('D:/temp/zozzo.log', $v, FILE_APPEND);
return new xmlrpcresp(new xmlrpcval($s->scalarval()));
}
<bookinfo>
<date>June 15, 2014</date>
+
<authorgroup>
<author>
<firstname>Edd</firstname>
</itemizedlist></para>
</sect1>
- <sect1> <title>3.0.0 beta</title>
+ <sect1>
+ <title>3.0.0 beta</title>
<para>This is the first release of the library to only support PHP 5.
Some legacy code has been removed, and support for features such as
public $xmlrpc_internalencoding = "ISO-8859-1"; // TODO: maybe this would be better as UTF-8, or atleast configurable?
public $xmlrpcName = "XML-RPC for PHP";
- public $xmlrpcVersion = "3.0.0.beta";
+ public $xmlrpcVersion = "4.0.0.beta";
// let user errors start at 800
public $xmlrpcerruser = 800;
* Given an xmlrpc client and a method name, register a php wrapper function\r
* that will call it and return results using native php types for both\r
* params and results. The generated php function will return an xmlrpcresp\r
-* oject for failed xmlrpc calls\r
+* object for failed xmlrpc calls\r
*\r
* Known limitations:\r
* - server must support system.methodsignature for the wanted xmlrpc method\r
* - for methods that expose many signatures, only one can be picked (we\r
-* could in priciple check if signatures differ only by number of params\r
+* could in principle check if signatures differ only by number of params\r
* and not by type, but it would be more complication than we can spare time)\r
* - nested xmlrpc params: the caller of the generated php function has to\r
* encode on its own the params passed to the php function if these are structs\r
*\r
* @param xmlrpc_client $client an xmlrpc client set up correctly to communicate with target server\r
* @param string $methodname the xmlrpc method to be mapped to a php function\r
-* @param array $extra_options array of options that specify conversion details. valid ptions include\r
+* @param array $extra_options array of options that specify conversion details. valid options include\r
* integer signum the index of the method signature to use in mapping (if method exposes many sigs)\r
* integer timeout timeout (in secs) to be used when executing function/calling remote method\r
* string protocol 'http' (default), 'http11' or 'https'\r
-* string new_function_name the name of php function to create. If unsepcified, lib will pick an appropriate name\r
+* string new_function_name the name of php function to create. If unspecified, lib will pick an appropriate name\r
* string return_source if true return php code w. function definition instead fo function name\r
* bool encode_php_objs let php objects be sent to server using the 'improved' xmlrpc notation, so server can deserialize them as php objects\r
* bool decode_php_objs --- WARNING !!! possible security hazard. only use it with trusted servers ---\r
\r
$encode_php_objects = isset($extra_options['encode_php_objs']) ? (bool)$extra_options['encode_php_objs'] : false;\r
$decode_php_objects = isset($extra_options['decode_php_objs']) ? (bool)$extra_options['decode_php_objs'] : false;\r
+ // it seems like the meaning of 'simple_client_copy' here is swapped wrt client_copy_mode later on...\r
$simple_client_copy = isset($extra_options['simple_client_copy']) ? (int)($extra_options['simple_client_copy']) : 0;\r
$buildit = isset($extra_options['return_source']) ? !($extra_options['return_source']) : true;\r
$prefix = isset($extra_options['prefix']) ? $extra_options['prefix'] : 'xmlrpc';\r
$PROXYPORT = 8080;
}
}
+ // used to silence testsuite warnings about proxy code not being tested
+ if(!isset($NOPROXY))
+ {
+ $NOPROXY = false;
+ }
if(!isset($URI))
{
// GUESTIMATE the url of local demo server