Website-Suche

Moodle - Ausnahme - Aufruf einer undefinierten Funktion xml_parser_create()


Symptome

Die folgende Fehlermeldung tritt während des Moodle-Upgrade-Versuchs auf, unabhängig davon, ob es sich um die Befehlszeile oder das Admin-Backend handelt:


php moodle/admin/cli/upgrade.php 
Default exception handler: Exception - Call to undefined function xml_parser_create() Debug: 
Error code: generalexceptionmessage
* line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()

!!! Exception - Call to undefined function xml_parser_create() !!!
!! 
Error code: generalexceptionmessage !!
!! Stack trace: * line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()
 !!

Lösung

Auf Ihrem System fehlt die PHP-XML-Bibliothek. Installieren Sie ein relevantes XML-PHP-Paket für Ihre Distribution und PHP-Version. Zum Beispiel unter Ubuntu 16.04 Xenial Xerus mit dem Apache Webserver ausführen:


apt-get install php7.0-xml
service apache2 restart

Versuchen Sie das Moodle-Upgrade erneut:


php moodle/admin/cli/upgrade.php 
== Upgrading Moodle database from version 3.1 (Build: 20160523) (2016052300) to 3.1+ (Build: 20160603) (2016052300.02) ==

Your Moodle files have been changed, and you are about to automatically
upgrade your server to this version:

3.1+ (BUILD: 20160603) (2016052300.02)

Once you do this you can not go back again. Please note that this process
can take a long time.

Are you sure you want to upgrade this server to this version?

type y (means yes) or n (means no)
: y
-->System
++ Success ++

Verwandte Artikel: