LJupdate plugin error

Creating and modifying plugins.
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

LJupdate plugin error

Post by techiem2 »

I'm trying to use the LJupdate plugin to mirror posts between 2 copies of my S9y blog, but it's not working.
When I save a post, I get the following error:
Posting to Serendipity...
XML_RPC_Client: Connection to RPC server :80 failed.
Notice: XML_RPC_Client: Connection to RPC server :80 failed. in /var/www/localhost/htdocs/bundled-libs/PEAR.php on line 848
XML_RPC_Client: Connection to RPC server :80 failed.
any suggestions?

Thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: LJupdate plugin error

Post by garvinhicking »

Hi!

This sounds like you didn'T configure the LJ server in the plugin?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

It's configured.
I just put the domain name in, as shown in the example.
Didn't put it in as http://domain.
I didn't fill in the LJ Cut text or Category ID fields, but I figured those were optional.

Thanks
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

When I put in the domain as http://domain, it doesn't throw the error on post, but it's not showing up in the other blog...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Is your server maybe firewalled? Can you send outgoing trackbacks or install plugisn through spartacus?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

Spartacus works fine on both servers.
I have the XML-RPC plugin installed on the remote server so it should be able to accept posts.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What URL did you enter for the remote server? The error message indicates that it cannot connect to that host...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

Ok.
Here's the pretty much full details.

I'm trying to post from my home blog at
https://techiem2.no-ip.com
to the domain blog at
http://www.techiem2.net
Both running s9y.
Both are installed to the root of the webspace.

I have the XML-RPC plugin installed on the remote blog.
Spartacus works fine on both blogs.

When I enter the LJ Server field as www.techiem2.net, techiem2.net, www.techiem2.net/, etc. it gets the error.

If I enter it as http://www.techiem2.net or http://www.techiem2.net/, it doesn't show any errors, but the post doesn't show up on the remote blog.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

When using http:// the plugin code doesn'T recognize this, I think. So "www.techiem2.net" would be the proper thing to use.

Please put this code on the blog directory as "xmltest.php" from where you're posting from:

Code: Select all

<?php
$fp = fsockopen('www.techiem2.net', 80);
fputs("GET /serendipity_xmlrpc.php HTTP/1.0\r\nHost:www.techiem2.net\r\n\r\n");
while(!feof($fp)) {
  echo htmlspecialchars(fread($fp, 4096));
}
fclose($proxy_fp);
Then call that PHP script via https://Techiem2.no-ip.com/xmltest.php

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

It sits and spins for a while then eventually gives:

Code: Select all

Warning: Wrong parameter count for fputs() in /var/www/localhost/htdocs/xmltest.php on line 3

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/localhost/htdocs/xmltest.php on line 7
If I wget the file, I get a file with this content:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                                                             
<methodResponse>                                                                                                                                                                                                   
<fault>                                                                                                                                                                                                            
  <value>                                                                                                                                                                                                          
    <struct>                                                                                                                                                                                                       
      <member>                                                                                                                                                                                                     
        <name>faultCode</name>                                                                                                                                                                                     
        <value><int>103</int></value>                                                                                                                                                                              
      </member>                                                                                                                                                                                                    
      <member>                                                                                                                                                                                                     
        <name>faultString</name>                                                                                                                                                                                   
        <value><string>XML error: no element found at line 1</string></value>                                                                                                                                      
      </member>                                                                                                                                                                                                    
    </struct>                                                                                                                                                                                                      
  </value>                                                                                                                                                                                                         
</fault>                                                                                                                                                                                                           
</methodResponse>     
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That means your server indeed is firewalled and cannot connect to the remote host. Please ask your server admin about firewalling and connection issues, this is definitely not a PHP/s9y issue...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

I am the server admin for the local site. :)
The server is allowed direct access to the net.
The wget test was done from that box.
I also checked with links from that box and can browse the remote site fine with it.

Maybe I have a php option or something that's keeping it from retrieving remotely?

Guess I'll start digging around my configs and such.
Probably something really simple....
hehe
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Is your PHP running as CGI or as mod_php? Do you have things like mod_security or suhosin running? Do you have changed your default php.ini? (allow url/socket connects?)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

Ok, I finally got back to looking into this a bit.
PHP is running mod_php.
I don't think I have mod_security or any such thing running.
I tried testing again using the sample code at http://us2.php.net/fsockopen
and got the following when I hit the test page on my site:

Code: Select all

HTTP/1.1 200 OK Date: Wed, 30 Apr 2008 20:54:47 GMT Server: Apache X-Powered-By: PHP/4.4.4 Set-Cookie: PHPSESSID=57418f59c50ae87b0d175262f2be56b0; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache X-Serendipity-InterfaceLang: en Content-Length: 380 Connection: close Content-Type: text/xml; charset=UTF-8     faultCode  103    faultString  XML error: no element found at line 1    
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Line 1 appears to be a blank line. This is invalid XML.

In the past we've seen this kind of error when one of the files involved has a blank before the <?php tag.

Unfortunately, if this is the problem, you'll need to check each file to find the extra blank. (If you've got some programming skill, you can follow the code and only check the files in the execution path. Or program something that removes any blank lines at the beginning of the file.)

I recently checked in some code that validates an upload with checksums, but it hasn't been extensively tested. In fact, so far as I know, I'm the only person who has tested it, although I've done it on two sandbox instances. If you're feeling daring, or you have a sandbox to test on, you can get the latest nightly and give it a spin.
Judebert
---
Website | Wishlist | PayPal
Post Reply