Commit d49f1ab0 authored by Nigel McNie's avatar Nigel McNie
Browse files

Check for the "xml" extension in addition to libxml. Fixes #2246.

The XML extension is needed by the RSS blocktype to parse RSS feeds. To be honest, I'm surprised it wasn't needed before to parse the install.xml files.
parent 0c5fc492
......@@ -33,7 +33,7 @@ $string['pgsqldbextensionnotloaded'] = 'Your server configuration does not inclu
$string['mysqldbextensionnotloaded'] = 'Your server configuration does not include the mysql extension. Mahara requires this in order to store data in a relational database. Please make sure that it is loaded in php.ini, or install it if it is not installed.';
$string['mysqldbtypedeprecated'] = 'You are using the dbtype "mysql" in your config file. Please change it to "mysql5" - "mysql" is deprecated.';
$string['unknowndbtype'] = 'Your server configuration references an unknown database type. Valid values are "postgres8" and "mysql5". Please change the database type setting in config.php.';
$string['libxmlextensionnotloaded'] = 'Your server configuration does not include the libxml extension. Mahara requires this in order to parse XML data for the installer and for backups. Please make sure that it is loaded in php.ini, or install it if it is not installed.';
$string['xmlextensionnotloaded'] = 'Your server configuration does not include the %s extension. Mahara requires this in order to parse XML data from a variety of sources. Please make sure that it is loaded in php.ini, or install it if it is not installed.';
$string['gdextensionnotloaded'] = 'Your server configuration does not include the gd extension. Mahara requires this in order to perform resizes and other operations on uploaded images. Please make sure that it is loaded in php.ini, or install it if it is not installed.';
$string['sessionextensionnotloaded'] = 'Your server configuration does not include the session extension. Mahara requires this in order to support users logging in. Please make sure that it is loaded in php.ini, or install it if it is not installed.';
$string['registerglobals'] = 'You have dangerous PHP settings, register_globals is on. Mahara is trying to work around this, but you should really fix it';
......
......@@ -59,8 +59,11 @@ function ensure_sanity() {
default:
throw new ConfigSanityException(get_string('unknowndbtype', 'error'));
}
if (!extension_loaded('xml')) {
throw new ConfigSanityException(get_string('xmlextensionnotloaded', 'error', 'xml'));
}
if (!extension_loaded('libxml')) {
throw new ConfigSanityException(get_string('libxmlextensionnotloaded', 'error'));
throw new ConfigSanityException(get_string('xmlextensionnotloaded', 'error', 'libxml'));
}
if (!extension_loaded('gd')) {
throw new ConfigSanityException(get_string('gdextensionnotloaded', 'error'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment