mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Installer now checks that MySQL extension is present - see bug 1982
This commit is contained in:
parent
8c3dba735b
commit
fe51520688
2 changed files with 28 additions and 17 deletions
10
install.php
10
install.php
|
@ -213,6 +213,15 @@ if ($INSTALL['stage'] == 3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($INSTALL['dbtype'] == 'mysql') { /// Check MySQL extension is present
|
||||||
|
if (!extension_loaded('mysql')) {
|
||||||
|
$errormsg = get_string('mysqlextensionisnotpresentinphp', 'install');
|
||||||
|
$nextstage = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($errormsg)) {
|
||||||
|
|
||||||
$db = &ADONewConnection($INSTALL['dbtype']);
|
$db = &ADONewConnection($INSTALL['dbtype']);
|
||||||
|
|
||||||
error_reporting(0); // Hide errors
|
error_reporting(0); // Hide errors
|
||||||
|
@ -234,6 +243,7 @@ if ($INSTALL['stage'] == 3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
error_reporting(7);
|
error_reporting(7);
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ $string['memorylimithelp'] = "
|
||||||
<p>However, on some servers this will prevent <b>all</b> PHP pages from working
|
<p>However, on some servers this will prevent <b>all</b> PHP pages from working
|
||||||
(you will see errors when you look at pages) so you'll have to remove the .htaccess file.
|
(you will see errors when you look at pages) so you'll have to remove the .htaccess file.
|
||||||
</ol>";
|
</ol>";
|
||||||
|
$string['mysqlextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MySQL extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP.';
|
||||||
$string['pass'] = 'Pass';
|
$string['pass'] = 'Pass';
|
||||||
$string['phpversion'] = 'PHP version';
|
$string['phpversion'] = 'PHP version';
|
||||||
$string['phpversionerror'] = 'PHP version must be at least 4.1.0';
|
$string['phpversionerror'] = 'PHP version must be at least 4.1.0';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue