Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-28 Thread László Monda
Thanks for the additional explanation, Mike! In the meantime I've created a full-blown PHP client library and uploaded it to https://github.com/mondalaci/supervisord-php-client It may make sense to include its reference into the supervisor documentation if you think so. On Fri, Aug 17, 2012 at 8

Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-17 Thread Mike Naberezny
Hi László, On 8/16/12 9:45 AM, László Monda wrote: Medusa should always report some sort of error even if the name or the URL of the RPC call is invalid instead of silently ignoring the request. Is this possible? Should I create a ticket for this? There is more than XML-RPC being served. Yo

Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-16 Thread László Monda
Silly me! I've just realized that I should have used the Content-Length HTTP header that the server provides me and read exactly that many bytes. This was clearly my stupidity but I think there's an actual issue: Medusa should always report some sort of error even if the name or the URL of the R

Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-16 Thread László Monda
Thanks a lot for your help, guys. Mike, your help almost completely solved my problem. Now I can make requests and receive responses. Unfortunately, there's a related annoying issue that I've encountered with: When Supervisor sends long XML responses to me and I have to make multiple reads on t

Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-14 Thread Mike Naberezny
Hi László, On 8/14/12 10:08 AM, László Monda wrote: $xml = xmlrpc_encode_request("getSupervisorVersion", NULL, array('encoding'=>'utf-8')); xmlrpc_encode_request("supervisor.getSupervisorVersion", NULL, array('encoding'=>'utf-8')); $request = 'POST / HTTP/1.1' . $crlf; $request = 'POST /RP

Re: [Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-14 Thread Dowling, Michael
If you have an `inet_http_server` running, try connecting to 'http://user:123@127.0.0.1:9001/RPC2'. I'm not sure about how you'd go about connecting to the socket. Similar question: http://www.mail-archive.com/supervisor-users@lists.supervisord.org/msg00746 .html -Michael On 8/14/12 10:08 AM, "

[Supervisor-users] Trying to make XML-RPC calls from PHP

2012-08-14 Thread László Monda
Hi List, I'm trying to use Supervisor's XML-RPC interface from PHP with not much success so far. Here's my code: 'utf-8')); print "* Request:\n$xml"; $crlf = "\r\n"; $request = 'POST / HTTP/1.1' . $crlf; $request .= 'Content-Length: '. strlen($xml) . $crlf; $request .= $crlf; $request .= $xml;