病征
不管是在命令行还是在后台管理后台,在尝试升级升级期间都会出现以下错误消息:
# 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()
!!
解
您的系统缺少php XML库。为您的发行版和PHP版本安装相关的XML php包。例如,在具有Apache网络服务器的Ubuntu 16.04 Xenial Xerus上运行:
# apt-get install php7.0-xml
# service apache2 restart
Re-attempt心情升级:
# 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 ++