admin/environment/php extension/xmlrpc

From MoodleDocs
Revision as of 10:22, 2 January 2023 by Eloy Lafuente (stronk7) (talk | contribs) (Add a note about the xmlrpc extension and Moodle 4.1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Note: The installation of the XMLRPC PHP extension is not needed for the latest versions of Moodle core anymore. All MNet features continue working exactly the same, but using a PHP library instead (see MDL-76055 for details).

If you were using the webservice_xmlrpc plugin for integrations with other systems, be warned that it has been removed from core for Moodle 4.1 (see MDL-76052 for details). It's now available @ https://github.com/moodlehq/moodle-webservice_xmlrpc and has been also published in the Plugins directory. Note that, if you want to continue using this plugin, then you will need, before starting the upgrade process, to:

  1. Install the XMLRPC PHP extension, the webservice requires it.
  2. Install the webservice_xmlrpc plugin, from the links in the previous paragraph, into the webservice/xmlrpc directory.
  3. Then, and only then, start the upgrade process.

To install the xmlrpc library on Microsoft Windows:

  1. Open the php.ini file, depending on your installation this may be found in the moodle/apache/bin folder
  2. Find the line: ;extension=php_xmlrpc.dll
  3. Remove the ; at the beginning of the line
  4. If necessary restart the web server, e.g. IIS or Apache.

To install the xmlrpc library on Linux/Unix

If you are using PHP as provided by the OS, you can just install the appropriate package, and restart the service (e.g. PHP-FPM or Apache):

  • On Ubuntu and Debian, the command is: apt-get install php-xmlrpc
  • On RedHat, Fedora, CentOS and SuSE, the command is: dnf install php-xmlrpc

If you compiled your PHP from source:

  1. You need to recompile PHP from source
  2. add --with-xmlrpc to the command line when you run configure

You can (usually) ignore this warning

There are 2 features in Moodle that require that PHP extension - both are disabled by default:

  1. "Moodle networking/Mnet" - has been historically used for connecting multiple Moodle sites to each other, so you can share login processes, or connecting Moodle to Mahara (an e-portfolio system). MNet is generally considered deprecated and the LTI features in Moodle mostly provide replacements; however Mnet still contains some functions that are not easy to reproduce using other methods - it's unlikely it will be officially removed until the functionality Mnet currently provides can be easily replicated using other functionality.
  2. XMLRPC Web services protocol - If enabled, Moodle web services allow external systems to make API calls to your Moodle site - there are a few different ways (protocols) that this data can be formatted; one of those protocols is XMLRPC and it uses the XMLRPC PHP exension to do this.

If you have not enabled either of these features, you can safely ignore the warning. PHP 8.0 has also removed the extension out of core, so Moodle is currently investigating the options of improving this warning/removing it - more info in https://tracker.moodle.org/browse/MDL-70889