title: Need help with xmlrpc in php
body: <p>I have downloaded phpxmlrpc from <a href="http://phpxmlrpc.sourceforge.net/" rel="nofollow noreferrer">http://phpxmlrpc.sourceforge.net/</a></p>
  
  <p>I have a folder on my webserver called xmlrpc-test and have a simple test php app created.</p>
  
  <pre><code>&lt;?php
  include 'xmlrpc.inc';
  include 'xmlrpcs.inc';
  
  function sumAndDifference ($params) {
  
      // Parse our parameters.
      $xval = $params-&gt;getParam(0);
      $x = $xval-&gt;scalarval();
      $yval = $params-&gt;getParam(1);
      $y = $yval-&gt;scalarval();
  
      // Build our response.
      $struct = array('sum' =&gt; new xmlrpcval($x + $y, 'int'),
                      'difference' =&gt; new xmlrpcval($x - $y, 'int'));
      return new xmlrpcresp(new xmlrpcval($struct, 'struct'));
  }
  
  // Declare our signature and provide some documentation.
  // (The PHP server supports remote introspection. Nifty!)
  $sumAndDifference_sig = array(array('struct', 'int', 'int'));
  $sumAndDifference_doc = 'Add and subtract two numbers';
  
  new xmlrpc_server(array('sample.sumAndDifference' =&gt;
                          array('function' =&gt; 'sumAndDifference',
                                'signature' =&gt; $sumAndDifference_sig,
                                'docstring' =&gt; $sumAndDifference_doc)));
  ?&gt;
  </code></pre>
  
  <p>I have loaded the phpxmlrpc debugger, entered the Address:, Port: and Path: but when I press the execute button for <code>List available methods</code> nothing happens.</p>
  
  <p><strong>Question 1</strong>: why does my local debugger not work?</p>
  
  <p>So I went online here <a href="http://phpxmlrpc.sourceforge.net/jsxmlrpc/debugger/debugger.html" rel="nofollow noreferrer">http://phpxmlrpc.sourceforge.net/jsxmlrpc/debugger/debugger.html</a> and it seems to work better.</p>
  
  <p>However, when I press the execute button here (after entering my server details) I get the following message.</p>
  
  <blockquote>
    <p>Fault code: [5] Reason: 'Didn't receive 200 OK from remote server. (send failed)'</p>
  </blockquote>
  
  <p>I thought this may have meant there was something wrong with my local server and the WAN so I tested the app at <a href="http://feedvalidator.org/" rel="nofollow noreferrer">http://feedvalidator.org/</a> and I do in fact get a response.</p>
  
  <pre><code>   1. &lt;?xml version="1.0"?&gt;
     2. &lt;methodResponse&gt;
     3. &lt;fault&gt;
     4. &lt;value&gt;
     5. &lt;struct&gt;&lt;member&gt;&lt;name&gt;faultCode&lt;/name&gt;
     6. &lt;value&gt;&lt;int&gt;105&lt;/int&gt;&lt;/value&gt;
     7. &lt;/member&gt;
     8. &lt;member&gt;
     9. &lt;name&gt;faultString&lt;/name&gt;
    10. &lt;value&gt;&lt;string&gt;XML error: Invalid document end at line 1, column 1&lt;/string&gt;&lt;/value&gt;
    11. &lt;/member&gt;
    12. &lt;/struct&gt;
    13. &lt;/value&gt;
    14. &lt;/fault&gt;
    15. &lt;/methodResponse&gt;
  </code></pre>
  
  <p>I think this is an error because there is not payload being sent.</p>
  
  <p><strong>Question 2:</strong>  How do I solve this?  How can I get a very simple xmlrpc server working with php?</p>