Page 1 of 2
w.bloggar doesn't work after update 0.8.4
Posted: Fri Sep 16, 2005 11:21 am
by bbruecker
After Updating my blog from 0.8.2 to 0.8.4 w.Bloggar is not able to connect to my server.
This is the error message:
Unable to parse the xml response. Parser Reason:in einem XML-Dokument ist nur ein Element höchster Ebene zugelassen -- here is my translation: in a XML dokument are only elements at the highest level allowed.
It worked before and the website seems to work properly.
The following attempts didn't help:
- unistall and reinstall the XML-RPC plugin.
- cmod for the directory: 777.
Re: w.bloggar doesn't work after update 0.8.4
Posted: Fri Sep 16, 2005 1:30 pm
by garvinhicking
Can you tell the URL of your blog (maybe per private message)?
Which version of the XML-RPC plugin are you using?
Best regards,
Garvin
Posted: Fri Sep 16, 2005 2:21 pm
by bbruecker
Hi Garvin,
Here is the URL:
http://s9y.benjminbruecker.de.
I've convused the version numbers. 0.8.1 is the version w.bloggar can connet. W.bloggar can connect if I upload the XML-RPC-file from the old package.
The version of the XML-RPC posting plugin is 1.5.
Best regards,
Benjamin
Posted: Fri Sep 16, 2005 2:39 pm
by garvinhicking
Hi Benjamin!
Calling your XMLRPC file via the browser (
http://s9y.benjaminbruecker.de/serendipity_xmlrpc.php) yields:
Code: Select all
Fatal error: Cannot redeclare xml_rpc_se() (previously declared in /kunden/benjaminbruecker.de/webseiten/s9y/bundled-libs/XML/RPC.php:249) in /kunden/benjaminbruecker.de/webseiten/s9y/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC.php on line 249
This shows that whatever way the RPC class has already been included.
This can be fixed by editing your serendipity_event_xmlrpc.php file in the plugins directory and changing this code:
Code: Select all
case 'frontend_xmlrpc':
if (!class_exists('XML_RPC_se')) {
require_once dirname(__FILE__) . '/PEAR/XML/RPC.php';
}
if (!class_exists('XML_RPC_Server')) {
require_once dirname(__FILE__) . '/PEAR/XML/RPC/Server.php';
}
require_once dirname(__FILE__) . '/serendipity_xmlrpc.inc.php';
$eventData = array('XML-RPC' => true);
return true;
Note the added if (class_exists()) statements. I also committed them to CVS as version 1.6 of the plugin.
HTH,
Garvin
Posted: Fri Sep 16, 2005 8:06 pm
by bbruecker
Hi Garvin,
Thanks you for answering so quickly.
I have now edited the file but w.bloggar doesn't work. The error message is the same as described above.
Maybe there is a mistake in my file. Here is the code of serendipity_event_xmlrpc.php:
Code: Select all
<?php # $Id: serendipity_event_xmlrpc.php,v 1.7 2005/09/12 15:57:58 garvinhicking Exp $
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
include $probelang;
}
@define('PLUGIN_EVENT_XMLRPC_NAME', 'Post via XML-RPC');
@define('PLUGIN_EVENT_XMLRPC_DESC', 'Allows to post/edit entries via the XML-RPC API (MT, Blogger Endpoints)');
class serendipity_event_xmlrpc extends serendipity_event
{
var $title = PLUGIN_EVENT_XMLRPC_NAME;
function introspect(&$propbag)
{
global $serendipity;
$propbag->add('name', PLUGIN_EVENT_XMLRPC_NAME);
$propbag->add('description', PLUGIN_EVENT_XMLRPC_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.5');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('event_hooks', array(
'frontend_xmlrpc' => true
));
$propbag->add('groups', array('FRONTEND_FULL_MODS', 'FRONTEND_EXTERNAL_SERVICES'));
}
function generate_content(&$title) {
$title = $this->title;
}
function event_hook($event, &$bag, &$eventData) {
global $serendipity, $HTTP_RAW_POST_DATA;
$hooks = &$bag->get('event_hooks');
$links = array();
$article_show = false;
if (isset($hooks[$event])) {
switch($event) {
/* case 'frontend_xmlrpc':
require_once dirname(__FILE__) . '/PEAR/XML/RPC.php';
require_once dirname(__FILE__) . '/PEAR/XML/RPC/Server.php';
require_once dirname(__FILE__) . '/serendipity_xmlrpc.inc.php';
$eventData = array('XML-RPC' => true);
return true;
default:
return false;
break;
*/
case 'frontend_xmlrpc':
if (!class_exists('XML_RPC_se')) {
require_once dirname(__FILE__) . '/PEAR/XML/RPC.php';
}
if (!class_exists('XML_RPC_Server')) {
require_once dirname(__FILE__) . '/PEAR/XML/RPC/Server.php';
}
require_once dirname(__FILE__) . '/serendipity_xmlrpc.inc.php';
$eventData = array('XML-RPC' => true);
return true;
break;
}
} else {
return false;
}
}
}
/* vim: set sts=4 ts=4 expandtab : */
I also added a line with "beak;" but this doesn't effect the result anyway.
Best regards,
Benjamin
Posted: Mon Sep 19, 2005 3:53 pm
by bbruecker
OK, today I installed the new version 1.6 of the XMLRPC plugin. But the W.Bloggar is still not able to connect to my blog. The error message is a little bit different from version 1.5:
Unable to parse the xml response. parer reason:ungültig auf der obersten Ebene im Dokument -- not valid at the higest level of the document.
Benjamin
Posted: Mon Sep 19, 2005 6:14 pm
by garvinhicking
Okay, the output of your PHP file now looks better.
Could you please edit the serendipity_xmlrpc.inc.php file of the plugin and set $debug_xmlrpc to "true" in the first few lines. This enables debugging of all XMLRPC traffic and saves it in a "rpc.log" logfile.
Could you please mail me that rpc.log file? Of course search the file for your password and replace all occurences with "XXX".
Regards,
Garvin
Posted: Mon Sep 19, 2005 9:28 pm
by bbruecker
Hallo Garvin,
where should the log file be stored?
Regards, Benjamin
Posted: Mon Sep 19, 2005 9:47 pm
by garvinhicking
Usually in the root of your serendipity blog.
Regards,
Garvin
Posted: Tue Sep 20, 2005 12:57 am
by Guest
Hi Garvin,
I can't find the variable in serendipity_config.inc.php.
Regard's,
Benjamin
Posted: Tue Sep 20, 2005 11:49 am
by garvinhicking
That's why I said the variable is in the serendipity_xmlrpc.inc.php file

)
Regards,
Garvin
Posted: Tue Sep 20, 2005 12:14 pm
by bbruecker
Hi Garvin,
I found the right variable in the right file at least (sorry -- I was tired and confused).
After four tests, I can't find any "rpc.log" logfile at my serendipity folders.
(I set all permissions to 777 for all of my serendipity folders and files.)
Is there also a variable where I can spezify the output folder for the file?
Kindly excuse any inconveniences and thank you for your patience, Garvin!
Benjamin
Posted: Tue Sep 20, 2005 12:17 pm
by garvinhicking
No problem, it's me who has to say a big thank you that you're going through all this. I'm terribly sorry that XML-RPC is currently not working out for you and I'd love to fix this problem, so I'm a bit dependant on your feedback.
Did you look in the plugin directory as well? But yes, you can specify a full path. Just open the serendipity_xmlrpc.inc.php file (Again) and serarch for
It shoudl occur twice in the file. Just replace that with:
Code: Select all
fopen('/full/path/to/where/you/want/your/logfile/rpc.log', 'a');
You could also try
Code: Select all
fopen($_SERVER['DOCUMENT_ROOT'] . '/rpc.log', 'a');
to put the log into your document root...
Regards,
Garvin
Posted: Tue Sep 20, 2005 1:43 pm
by Guest
Hi Garvin,
I'd like to help because after testing many blog systems serendipity is pretty the program which meets my requierements. I only miss two or three little things.
Ok, I changed the "serendipity_xmlrpc.inc.php" the variable twice times in two ways:
Code: Select all
$fp = fopen('/kunden/benjaminbruecker.de/webseiten/s9y/rpc.log', 'a');
or
Code: Select all
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/rpc.log', 'a');
But after my tests there I found no rpc.log file created.
I also checked the root folder of my webspace account at domainfactory -- no rpc.log.
Permision 777 at any file or folder is enough?
Is there another way than using w.bloggar to push the log logging?
Regard's Benjamin
Posted: Tue Sep 20, 2005 3:07 pm
by garvinhicking
I just installed my XML-RPC posting plugin and w.bloggar, and I can connect fine to my Serendipity installation.
Thus I guess it must be a setting that's not right on your blogger account. How did you setup your account exactly?
I set:
Blog System: "Angepasst" ("Custom")
Name des Kontos: myhost
Host: myhost.com
Seite: /serendipity/serendipity_xmlrpc.php
Port: 80, HTTPS NOT checked
Einträge: Blogger API
Kategorien: Nicht unterstützt
Vorlagen: Blogger API
Tags: <title>, <category>, <more_text>
Maybe you can give me your mail adress, then I'll send you a test account to test your w.bloggar on my host, and maybe you can create me account so that I can test on your account.
Regards,
Garvin