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 the socket the last read blocks.  I've tried to set
the socket nonblocking but that resulted in PHP not able to read
anything from the socket.  Currently, I set the socket to blocking and
set its timeout to 10 ms and it works but this is an ugly, unstable
hack and I'm interested in how to do it properly.

It is very likely that I'm not knowleadgable enough about sockets and
this issue doesn't directly pertains to Supervisor.  Anyways, I'd
really appreciate if some of you could shed some light on this.

I attached my code this time.

On Tue, Aug 14, 2012 at 7:53 PM, Mike Naberezny <m...@maintainable.com> wrote:
> 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 /RPC2 HTTP/1.1' . $crlf;
>
> After the two changes above, your code shows the expected XML-RPC response
> when I run it from PHP on the command line.
>
> Regards,
> Mike
>
> --
> Mike Naberezny
> Maintainable Software
> http://maintainable.com
>
>
> _______________________________________________
> Supervisor-users mailing list
> Supervisor-users@lists.supervisord.org
> http://lists.supervisord.org/mailman/listinfo/supervisor-users



-- 
László Monda <http://monda.hu>

<<attachment: test.php>>

_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to