XMLRPC issues

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

XMLRPC issues

Post by electroteque »

I upgraded the xml rpc pear package, but im still exerpeicing an issue where the response is a php error. Here is the error

Response:
<br />
<b>Fatal error</b>: Cannot redeclare xml_rpc_se() (previously declared in /Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC.php:249) in <b>/Volumes/FIREWIRE/www/classes/PEAR/XML/RPC.php</b> on line <b>370</b><br />


I made all the usual changes in the scripts, it seems to publish fine but the response is returning an error, any ideas ?
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

Post by electroteque »

Yes it ended up being the latest pear package i copied over, can someone send me a link to download the latest patched file this is a pain in the ass, its trying to load somewhere the xml rpc from my standard pear include path. Im really thinking of trying to come up with an Atom API plugin instead this is crap :\
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I think you had this problem before. Your webserver is somewhere starngely including the PEAR XML-RPC api, but it's not caused by Serendipity.

You can fetch the files of that plugin here:

http://cvs.sourceforge.net/viewcvs.py/p ... ent_xmlrpc

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/
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

Post by electroteque »

Yes bizarrely enough, when i moved over my copy of the xmlrpc from my pear directory, i only made the change in Server.php , you also have to make a change in RPC.php to not include pear

function raiseError($msg, $code)
{
/*
include_once 'PEAR.php';
*/
if (is_object(@$this)) {
return PEAR::raiseError(get_class($this) . ': ' . $msg, $code);
} else {
return PEAR::raiseError('XML_RPC: ' . $msg, $code);
}
}

Theres nothing strange about my server, it has a default include to pear ?
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

Post by electroteque »

Hi, i managed to download those files, i got a shit load of errors returning, even though the entry is being added, it breaks ecto and wont update the entry to be a published entry. Is there a way to return error codes so that ecvto can pick these up , instead of it breaking because of php error message output ?

<br />
<b>Warning</b>: include_once(/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/lang_en.inc.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/serendipity_event_xmlrpc.php</b> on line <b>9</b><br />
<br />
<b>Warning</b>: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/lang_en.inc.php' for inclusion (include_path='.:/Volumes/DATA/www/hardgayfeeds/classes:/www/classes/PEAR:./classes:/www/classes:/www/hardgayfeeds/classes:./includes:/Volumes/FIREWIRE/www/dev/weblog/:/Volumes/FIREWIRE/www/dev/weblog/bundled-libs/') in <b>/Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/serendipity_event_xmlrpc.php</b> on line <b>9</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/serendipity_event_xmlrpc.php:9) in <b>/Volumes/FIREWIRE/www/dev/weblog/include/functions_config.inc.php</b> on line <b>418</b><br />
<br />
<b>Fatal error</b>: Cannot redeclare xml_rpc_se() (previously declared in /Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC.php:249) in <b>/Volumes/FIREWIRE/www/classes/PEAR/XML/RPC.php</b> on line <b>370</b><br />

This is a bit sukky, maybe we should work on a Atom XML implementation ?
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

Post by electroteque »

Ok i worked out i had to download the english language file which wasnt there already, i still get this error, pear is the first include path in the php config so its obviouslly loading ti first ? I think bundling pear like this is a stupid idea, or at least have a system to systematically be able to upgrade the packages and patch it in the admin system.

Response:
<br />
<b>Fatal error</b>: Cannot redeclare xml_rpc_se() (previously declared in /Volumes/FIREWIRE/www/dev/weblog/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC.php:249) in <b>/Volumes/FIREWIRE/www/classes/PEAR/XML/RPC.php</b> on line <b>370</b><br />
electroteque
Regular
Posts: 58
Joined: Tue Jan 17, 2006 2:13 am

Post by electroteque »

I found a similar topic here

http://www.s9y.org/forums/viewtopic.php ... t=xmlrpcse

here is the fix

if (!function_exists('XML_RPC_se')) {
require_once dirname(__FILE__) . '/PEAR/XML/RPC.php';
}
Post Reply