Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.5

Bug #1498 documentation out of date in using ssl with xml_rpc, plus ssl patch
Submitted: 2004-05-25 19:49 UTC
From: allins at nosc dot mil Assigned: danielc
Status: Duplicate Package: XML_RPC
PHP Version: 4.3.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-05-25 19:49 UTC] allins at nosc dot mil
Description: ------------ send function only accepts 2 params, not an optional 3rd for 'http' or 'https' as documentation currently states. protocol to use is passed back to fsockopen from teh XML_RPC_Client class. to use https, prepend the hostname with 'ssl://'. example: $client = new XML_RPC_Client("/server.php","ssl://127.0.0.1",443);

Comments

 [2004-05-26 21:38 UTC] allins at nosc dot mil
inclusion of 'ssl://' will break Host parameter in the http headers when it's formed using the $server value directly. created a patch to strip 'ssl://' from Host parameter if it exists, as well as as add ':port' to align with rfc2616 section 14.23 diff patch against v1.1.0 --- RPC.php.base 2004-05-26 08:05:05.685108568 -0700 +++ RPC.php 2004-05-26 08:02:09.826843088 -0700 @@ -500,7 +500,8 @@ $op .= $this->path. " HTTP/1.0\r\n" . "User-Agent: PEAR XML_RPC\r\n" . - "Host: " . $this->server . "\r\n"; + "Host: " . str_replace("ssl://","",$this->server) . + ":" . $this->port . "\r\n"; if ($this->proxy && $this->proxy_user != '') { $op .= 'Proxy-Authorization: Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass) .
 [2004-07-14 20:00 UTC] beheer at pixture-it dot nl
I tried the patch. It works, but I get the following error message: Warning: fread(): SSL: fatal protocol error in /usr/share/pear/XML/RPC.php on line 665 any ideas? rebo
 [2004-07-14 20:08 UTC] allins at nosc dot mil
What platform OS? Redhat perchance? there's a bug involving the ssl error message that I'm hoping will be corrected in next release on RedHat. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124582 In meantime, the patch I put together on fedora
 [2004-08-25 06:02 UTC] huleboer at linuxno dot com
I also get this error. Trying to use xml-rcp over ssl. Applied the patch but still won't work (get Didn't receive 200 OK from remote server. (HTTP/1.1 500 Internal Server Error.)). Anyway I also get the error. It's reffering to the line: while($data = fread($fp, 32768)) { I'm running an old redhat but all web stuff is latest versions compiled by me. I'm using apache 2.x with php 4.x. Let me know if you need more info. I'm kind of hoping this will be fixed fast since I need to get xml-rpc working over ssl (doesn't look like it's working at all here?).
 [2004-08-25 23:40 UTC] allins at nosc dot mil
looks like current updates on redhat RHE3 fixed the problem now. However, on Fedora FC2, the openssl is compiled as shared, breaking the ssl functions in fsockopen now as comments indicate needs to be compiled statically. To check, either a: check for 'https' in in phpinfo under 'Registered PHP Streams' or b: run the following script as a test <? $fp=fsockopen("ssl://mail.yahoo.com",443); $out="GET / HTTP/1.1\r\n"; $out .="Host: mail.yahoo.com\r\n"; $out .="Connection: Close\r\n\r\n"; fwrite($fp,$out); while (!feof($fp)) { echo fgets($fp,128); } fclose($fp); ?>
 [2004-12-29 20:32 UTC] danielc
The fix for Bug 2489 should make the XML_RPC package handle SSL correctly at this point. Many of the comments in this report indicate problems with PHP and the OS, so not a bug for this package. If this issue isn't resolved, please reopen the bug.