Discussion:
[phpxmlrpc] Strange behaviour: double call to functions?
Jorge López
2008-11-18 09:59:22 UTC
Permalink
Hi there,

I'm having some trouble with phpxmlrpc 2.2.1 server.

This problem began when I tried a Perl XML-RPC client, which told me
that it was receiving bad XML as response. I checked its debug output,
and I saw that response was duplicated (<?xml ...>....<?xml ...>...).
Using phpxmlrpc client I had no problems, so I thought it was a
problem with that concrete Perl XML-RPC client.

But recently I started doing some database modification from a
phpxmlrpc server, and I got duplicated rows on the database. I
suspected the function was being called twice and I added some debug
lines on my function (fopen+fwrite), and I was right: my function is
being called twice.

Is this a known phpxmlrpc bug? Am I doing anything wrong?

Regards.
Gaetano Giunta
2008-11-18 10:32:23 UTC
Permalink
Post by Jorge López
Hi there,
I'm having some trouble with phpxmlrpc 2.2.1 server.
This problem began when I tried a Perl XML-RPC client, which told me
that it was receiving bad XML as response. I checked its debug output,
and I saw that response was duplicated (<?xml ...>....<?xml ...>...).
Using phpxmlrpc client I had no problems, so I thought it was a
problem with that concrete Perl XML-RPC client.
But recently I started doing some database modification from a
phpxmlrpc server, and I got duplicated rows on the database. I
suspected the function was being called twice and I added some debug
lines on my function (fopen+fwrite), and I was right: my function is
being called twice.
Is this a known phpxmlrpc bug? Am I doing anything wrong?
The server constructor executes the call, unless you pass to it a FALSE
parameter.

So if you build a server object and later call execute on it, it might
do the job twice...

Bye
Gaetano
Post by Jorge López
Regards.
_______________________________________________
phpxmlrpc mailing list
phpxmlrpc at lists.usefulinc.com
http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc
Jorge López
2008-11-18 11:19:41 UTC
Permalink
Hi,
Post by Gaetano Giunta
The server constructor executes the call, unless you pass to it a FALSE
parameter.
So if you build a server object and later call execute on it, it might do
the job twice...
That was the problem! Now it works all right :)

Thank you very much for your help, Gaetano.

Regards,

Jorge.

Loading...