Re: empty payload received from XML-RPC server

"jeromakay" <[email protected]> Thu, 20 Dec 2007 12:46:24 -0000
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
Hi Gaetano, 

Thanks for the feedback. 


Well, so far I checked the apache logs, I see a POST via HTTP to that
URL, a 200 OK reposonse is returned, and the body size, according to
the logs, is empty.

Also, error_reporting is set to E_ALL, and no feedback is sent. 

Last night I checked the XML_RPC class code, and I've seen fsockopen
is used. 

Checked the status of the stream using the builtin PHP funciton
socket_get_status($the_stream), and no time out is reported, or any
content. The content is 0 bytes long, r+ stream type. This is the
feedback I've found inside the XML_RPC_Client::sendPayloadHTTP10()
PEAR class' method.

Quick story: So, at this moment, the connection is corectly created on
the port #80 on the remote server, but I'd like to see some headers in
this particular situations. The HTTP response is 200 OK according to
the apache logs, but no headers are received.

And AN IMPORTANT THING: when the page has an echo 'whatever', right
before sending the content-type: text/xml headers, and the XML-RPC
body, we have the header related warnings, and things go well.

So far, I'm thinking of few possible solutions:

- an apache bug on the remote server  (other servers work ok, this one
doesn't)
- a PHP local error
- replace fsock open inside the PEAR xml_rpc class instead of fsockopen.


BTW, the header of the PEAR XML-RPC class has this info about the
version of the pear package I'm using (I'm not a CVS fan, but I think
it may help readers find out what needs to be done):

* @version    CVS: $Id: RPC.php,v 1.88 2005/10/15 20:29:43 danielc Exp $

What's your input knowing all this stuff now? 

Thanks, 

Vladimir Ghetau
http://www.Vladimirated.com/

--- In [email protected], Gaetano Giunta <giunta.gaetano@...> wrote:
>
> A 100% empty response, by a php powered server, is usually the
result of 
> a fatal error in the code.
> If php is configured not to display errors on screen (as it really 
> should be in production servers), and the xml output is echoed at the 
> end of processing (as the PEAR lib does), you will end up with an empty 
> page.
> I think the most likely cause for such a behaviour is to be found
within 
> the code that implements the webservice (wordpress?), not within the 
> pear lib itself.
> 
> Debugging tips:
> check php error log on the server
> enable display_errors=on on the server
> if server is on hosting and you got little access to it, set up the
same 
> code that is powering the server on a dev machine and test it there
> 
> Bye
> Gaetano
> 
> 
> > hi guys,
> >
> > I'm new here. I've browsed the list for some feedback about what's
> > next when the received payload is empty and didn't find much.
> >
> > I'm connecting to a XML-RPC server, powered by wordpress blogging
> > platform. So far, it returns nice responses, but in one case, there's
> > no payload.
> >
> > I enabled debugging, all I can see is:
> >
> > ---GOT---
> >
> > ---END---
> >
> > No content, nothing. I'll try to check the code of the PEAR XML-RPC
> > package, and debug the http response, and so on, however, I'm thinking
> > I'm spending too much time on it trying to read the class' code and
> > get more of the debugging output
> >
> > What would you do next? I've tried to see what I'm sending, the info
> > is sent, but nothing comes back. Probably a HTTP response output
> > (including headers) will do, but I don't want to dive into the
code... so?
> >
> > Thanks for your feedback.
> >
> > Vladimir Ghetau
> > http://www.Vladimirated.com/ <http://www.Vladimirated.com/>
> >
> >  
> 
> 
> 
> [Non-text portions of this message have been removed]
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/