create USER via REST or XML-RPC fails with "invalidrecord Can not find data record in database table external_functions"

Re: create USER via REST or XML-RPC fails with "invalidrecord Can not find data record in database table external_functions"

by Irfan Hanfi -
Number of replies: 0

Hi David,


I am getting the same error after updating moodle to Moodle 3.1+ (Build: 20160603)

An unexpected error happened: 23604497: Can not find data record in database table external_functions. | DEBUG INFO: SELECT * FROM {external_functions} WHERE name IS NULL [array egg] | ERRORCODE: invalidrecord


I am using Joomdle which connects Joomla with Moodle using XMLRPC . It was working previously but when we upgraded moodle it gives above error. It is working for PHP 5.6.19 but not on PHP 5.4.36.


After some debugging I found that result differs from below code(/moodle/webservice/xmlrpc/locallib.php:80) -


 // Decode the request to get the decoded parameters and the name of the method to be called. 

$decodedparams = xmlrpc_decode_request($rawpostdata, $methodname);


xmlrpc_decode_request does not return $methodname on  PHP 5.4.36 but works on  PHP 5.6.19.


Is there any suggestion that could help to fix the issue?


Thank you.