PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » XML_RPC » Bug #1031

https appears to not be supported?

Details

Submitted2004-03-17 16:09 UTC
Fromallins at nosc dot mil
StatusBogus
PackageXML_RPC
PHP Version4.2.2
OSredhat 9
Roadmaps(Not assigned)

Comments

[2004-03-17 16:09 UTC] allins at nosc dot mil

Description:
------------
despite the documentation saying method 'https' is supported, a browse through the RPC.php file shows it is not.
The original version from usefulinc.com did.
instead ended up with errors for trying to use http on https port.

send function in RPC.php only uses send($msg,0) with no param for protocol https.

Reproduce code:
---------------
<?php
require_once "XML/RPC.php";

/**
* Get the name of state 42 (Tenesse)
*/
$params = array(new XML_RPC_Value(42, "int"));
$msg = new XML_RPC_Message("examples.getStateName", $params);

$client = new XML_RPC_Client("/RPC2", "127.0.0.1", 443);

$response = $client->send($msg,0,"https");

$v = $response->value();

if (!$response->faultCode()) {
print "State number 42 is " . $v->scalarval() . "\n";
print "I got this value back:\n" . $response->serialize() . "\n";
} else {
print "Fault: ";
print "Code: " . $response->faultCode() . " Reason '" . $response->faultString() . "'\n";
}
?>

[2004-05-25 19:52 UTC] allins at nosc dot mil

traced back to function fsockopen not having ssl support until php 4.3.0