How To / General

Upgrade to PHP 8 and I get "Call to undefined function xmlrpc_encode_request()"

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago - 2 years 7 months ago #1 by Eric vanBok
Hello.

I have a website that is currently on PHP 7.4 and I am trying to get it on PHP 8. When I do switch to PHP 8 I get the following error if I look at the My Courses page:

Call to undefined function xmlrpc_encode_request()

If I switch back to PHP 7.4 it works fine.

I have Joomdle, in both Joomla and Moodle, set to be using REST, not XML-RPC, and it works fine when running PHP 7.4. On PHP 8 though I know that XML-RPC isn't bundled with it and is likely why it is breaking.

My question though is why is it breaking if I am using REST not XML-RPC?

Anyone have any thoughts on this?

Joomla 3.10.12
Joomdle 2.2.0
PHP 7.4.33
Last edit: 2 years 7 months ago by Eric vanBok.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #2 by Antonio Durán
Hi.

Is system check all green when using PHP 8?
If you get the xmlrpc problem, try saving the configuration again in Joomla and Moodle after selecting REST.

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #3 by Eric vanBok
I checked that and I was getting an xmlrpc error in the system check on PHP 8.

I resaved the configurations for Joomdle in both Joomla and Moodle. Now I am getting the following red X and error in system check, and I am getting it with both PHP 7.4 and PHP 8 now.

Joomdle Web Services - Access control exception

I looked in the docs and didn't see this error specifically. What is my next step in fixing this?

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #4 by Antonio Durán
Enable debugging in Moodle to get more info.

Please Log in or Create an account to join the conversation.

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #5 by Eric vanBok
Thank you! That lead me to the source of the problem the REST web service didn't have the correct permissions for the token I was using. Made that change and it is working perfectly.

Thanks again for pointing me in the right direction.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #6 by Antonio Durán
Great, thanks for the feedback.

Please Log in or Create an account to join the conversation.