I am using vinculum to send/receive ping/trackbacks between two Drupal sites. It requires xmlrpc to work for pingback.ping.

It tries to hit http://server.com/xmlrpc.php and gets a 500 PHP error. This is the same error in http://drupal.org/node/1260524 however it is not working as designed, or there is some weird configuration that is required somewhere to define an endpoint.

The function that is needed is in services.runtime.inc, which doesn't seem to be included in the normal execution path of a generic request for XML-RPC services.

Error message:

<br />
<b>Fatal error</b>:  Call to undefined function services_get_server_info() in <b>modules/services/servers/xmlrpc_server/xmlrpc_server.module</b> on line <b>42</b><br />

The line is:

$resources = services_get_resources(services_get_server_info('endpoint', ''));

I changed it to this quick, and now the script runs without an error. For some reason services.runtime.inc is not being included in a normal request to xmlrpc.php. I'd submit a patch but this is probably not the best place to put this call, it's almost impossible to find the right spot for it though, and this seems like services.runtime.inc should be included in any service module related request anyway.

module_load_include('runtime.inc', 'services');
$resources = services_get_resources(services_get_server_info('endpoint', ''));

Comments

thursdasy’s picture

I can confirm I ran into the same problem with a vanilla installation and the above 'include' resolved the 500 error returned. I was getting the following error when attempting to do any basic xmlrpc request. Here is what is found in apache error.log:

[Fri Dec 16 12:39:53 2011] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function services_get_server_info() in /var/www/drupal/modules/services/servers/xmlrpc_server/xmlrpc_server.module on line 41

My steps to reproduce are just install Drupal(7.10), Services(7.x-3.1), and then enable XMLRPC Server(7.x-3.1) and try to make any request and it will fail.

kylebrowning’s picture

Status: Active » Fixed
mike503’s picture

Kyle,

Can you confirm which version it was fixed in/the diff or patch or some other reference?

Thanks

mike503’s picture

Ah, was that the appropriate fix? It was just a hack I threw in on mine. It seemed like that include should be included for the majority of service calls.

oh and when does it get baked into an official drupal.org release?

i am new to the process of when things get baked in.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dgtlmoon’s picture

Yes this fixed my issues, probably could do with making a new release

interestingly I only hit this bug when I started accessing the Drupal stack from a different hostname

dgtlmoon’s picture

Issue summary: View changes

Clarified some details