<html>
<body>
After the changes, I keep on getting this (and I am beginning to get
insane!):<br>
<b>Fatal error</b>: Cannot redeclare xmlrpc_decode() in
/<b>.../xmlrpc.inc</b> on line <b>1380<br><br>
</b>Sam<br><br>
At 14.52 17/12/03, you wrote:<br>
<blockquote type=cite class=cite cite>Hi Sam,<br><br>
You should not need to do the xmlrpc_encode, and you need to<br>
pass in an array of parameters instead of a scalar value;<br>
try it like this:<br><br>
&gt; $par1=new xmlrpcval(array(<br>
&gt; &quot;first_param&quot; =&gt; new xmlrpcval(&quot;first_value&quot;,
&quot;string&quot;),<br>
&gt; &quot;second_param&quot; =&gt; new
xmlrpcval(&quot;second_value&quot;, &quot;string&quot;)),
&quot;struct&quot;);<br>
&gt; $f=new xmlrpcmsg(&quot;method&quot;,array($par1));<br>
&gt; $r=$client-&gt;send($f);<br><br>
You should also use the defined XML-RPC constants for the data types.
Here<br>
is how I would write this code:<br><br>
$client = new xmlrpc_client(&quot;path&quot;, &quot;server&quot;,
80);<br>
$p1 = new xmlrpc_val(&quot;first_value&quot;, $xmlrpcString);<br>
$p2 = new xmlrpc_val(&quot;second_value&quot;, $xmlrpcString);<br>
$par1 = new xmlrpc_val(array(&quot;first_param&quot; =&gt; $p1,
&quot;second_param&quot; =&gt; $p2), $xmlrpcStruct);<br>
$f=new xmlrpcmsg(&quot;method&quot;, array($par));<br>
$r=$client-&gt;send($f);<br><br>
This should work, but I don't have access to your server so I<br>
can't say for sure.<br><br>
Turning on client debugging can be helpful too. After<br>
you create the client (first line above), try this:<br><br>
$client-&gt;setDebug(1);<br><br>
You can find a very comprehensive XML-RPC client at<br>
<a href="http://groups.yahoo.com/group/syndic8-dev/files/XML-RPC%20Test%20Program/" eudora="autourl">http://groups.yahoo.com/group/syndic8-dev/files/XML-RPC%20Test%20Program/</a><br><br>
This client calls the Syndic8 XML-RPC functions, as described at<br>
<a href="http://www.syndic8.com/services.php" eudora="autourl">http://www.syndic8.com/services.php</a>
.<br><br>
Hope this helps!<br><br>
Jeff;<br><br>
&gt; $par1=new xmlrpcval(array(<br>
&gt; &quot;first_param&quot; =&gt; new xmlrpcval(&quot;first_value&quot;, &quot;string&quot;),<br>
&gt; &quot;second_param&quot; =&gt; new xmlrpcval(&quot;second_value&quot;, &quot;string&quot;)), &quot;struct&quot;);<br>
&gt; $par=xmlrpc_encode($par1);<br>
&gt; $f=new xmlrpcmsg(&quot;method&quot;,$par);<br>
&gt; $r=$client-&gt;send($f);<br><br>
<br>
<blockquote type=cite class=cite cite>Hi everybody,<br>
I am new to phpxmlrpc. I downloaded the xmlrpc class and tried to use it.<br>
After lots of tries, I keep on getting this error:<br>
*Fatal error*: Cannot redeclare xmlrpc_decode() in */.../xmlrpc.inc* on line *1380<br>
*I can get out of this, can anyone help me?<br>
I am working with a very simple script like this:<br>
$client=new xmlrpc_client(&quot;path&quot;, &quot;server&quot;, 80);<br>
$par1=new xmlrpcval(array(<br>
&quot;first_param&quot; =&gt; new xmlrpcval(&quot;first_value&quot;, &quot;string&quot;),<br>
&quot;second_param&quot; =&gt; new xmlrpcval(&quot;second_value&quot;, &quot;string&quot;)), &quot;struct&quot;);<br>
$par=xmlrpc_encode($par1);<br>
$f=new xmlrpcmsg(&quot;method&quot;,$par);<br>
$r=$client-&gt;send($f);<br>
Thank you in advance<br>
Sam</blockquote></blockquote></body>
</html>