CodeIgniter Forums
XML-RPC Issue/Bug - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: XML-RPC Issue/Bug (/showthread.php?tid=3795)

Pages: 1 2


XML-RPC Issue/Bug - El Forum - 10-22-2007

[eluser]Unknown[/eluser]
This is in continuation to this thread:
http://ellislab.com/forums/viewthread/53105/

I'm bringing this up in a new thread since the old one seems inactive and the workaround posted there doesn't work for me either.

The issue is that the code on the documentation page located here:
http://ellislab.com/codeigniter/user-guide/libraries/xmlrpc.html
- doesn't work. If I call the client code I get this:
"Did not receive a '200 OK' response from remote server."
If I call the server page directly I get this:
faultcode 105
XML error: Invalid document end at line 1

Since the PHP issue ( http://bugs.php.net/bug.php?id=41293 ) is fixed in 5.2.2 and I'm running PHP 5.2.4 I'm assuming this an issue with the CodeIgniter source code?

Thanks,

Mark H.


XML-RPC Issue/Bug - El Forum - 10-22-2007

[eluser]alexsancho[/eluser]
I've got same error and solved it making some changes to Xmlrpcs.php,

Code:
function parseRequest($data='')
    {
        global $HTTP_RAW_POST_DATA;
        
        //-------------------------------------
        //  Get Data
        //-------------------------------------

        if ($data == '')
        {
            if ( !isset( $HTTP_RAW_POST_DATA ) ) {
                   $HTTP_RAW_POST_DATA = file_get_contents("php://input");
            }
            $data = $HTTP_RAW_POST_DATA;
        }
        ...

Regards


XML-RPC Issue/Bug - El Forum - 10-22-2007

[eluser]Unknown[/eluser]
[quote author="alexsancho" date="1193088940"]I've got same error and solved it making some changes to Xmlrpcs.php[/quote]

Hmmm, I just tried that but still get the same errors.

Thanks,

Mark H.


XML-RPC Issue/Bug - El Forum - 11-22-2007

[eluser]gtech[/eluser]
An odd one this as I have just encountered the same problem when I moved my development to my laptop from my desktop

One machine the code works fine and I get a response.. the other machine (with identical code out of a repository) has the

XML error: Invalid document end at line 1

so this has to be some form of setup issue, both my machines have the same config scripts and the directory structure is identical.. (apart from the base_url's are set differently)

Has anyone else come across this issue?

in the meantime I will try and find any differences between setups (e.g. php version)


XML-RPC Issue/Bug - El Forum - 11-22-2007

[eluser]gtech[/eluser]
well strange this I use Xampp(apache friends) which is a distribution of apache, php and mysql..

Yhe only difference is that my desktop (where the xmlrpc class works fine) is an older version of Xampp where on my laptop its a newer version !!?!!

on the newer version I get the error

XML error: Invalid document end at line 1

I will post up any findings,

anyone else had this problem?

I tried alexsancho fix and it worked for me, so one machine needs the fix and the other doesn't.


XML-RPC Issue/Bug - El Forum - 11-22-2007

[eluser]gtech[/eluser]
for anyone who is interested my newer xampp distribution runs on PHP 5.2.2 and needs the fix that alexsancho posted... (thanks for that saved me a lot of time!)

My older distribution runs on PHP 5.2.1 and works fine without the fix.

has XMLRPC been tested with a PHP > than 5.2.1???? I have logged a bug report


XML-RPC Issue/Bug - El Forum - 02-27-2008

[eluser]jeffpeck[/eluser]
I have solved this for myself and perhaps this is the answer for others as well... it was actually something very simple.

In the example code there is the line:
Code:
$this->xmlrpc->server($server_url, 80);

That "80" is the port number, which means that if you are running this on a server with a port number (i.e. mydevserver.com:8888), this will not connect and give back the error "Did not receive a '200 OK' response from remote server", because it is actually receiving a 404 error!

Now, if you try to access the server side directly you will get an error (105) since no data is being sent, so if you attempt to "test" it that way you will get an error as well.

Anyway, be sure to set that "80" to your appropriate port number and it should be all set!

- Jeff


XML-RPC Issue/Bug - El Forum - 04-22-2008

[eluser]Unknown[/eluser]
Excelent post Jeff Peck.

This post really made me open my eyes.

Thanks.


Omar


XML-RPC Issue/Bug - El Forum - 04-22-2008

[eluser]gtech[/eluser]
Both my set ups were on port 80, and the only difference between the two set ups was the php version, apart from that my configuration was the same (or appeared to be the same) both machines were using pre1.6 of codeigniter though. I will retest when I get my old laptop back Smile.

however you are right you will get a 404 error if running on a different port.


XML-RPC Issue/Bug - El Forum - 10-01-2008

[eluser]Unknown[/eluser]
i still got some error with xml rpc... Error message like this Did not receive a '200 OK' response from remote server.
I use xampp 1.6.3, CodeIgniter 1.6.3 and Windows Vista.
This error occur ini notebook but in my pc that is no problem. Please somebody help me..