define('MOODLE_INTERNAL', true);
// Check that PHP is of a sufficient version
-if (version_compare(phpversion(), "5.2.8") < 0) {
+if (version_compare(phpversion(), "5.3.2") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
- echo "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion).\n";
- echo "Please upgrade your server software or install latest Moodle 1.9.x instead.";
- die;
+ fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
+ fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
+ exit(1);
}
// set up configuration
";
// Check that PHP is of a sufficient version
-if (version_compare(phpversion(), "5.2.8") < 0) {
+if (version_compare(phpversion(), "5.3.2") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
- fwrite(STDERR, "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion).\n");
- fwrite(STDERR, "Please upgrade your server software or install latest Moodle 1.9.x instead.\n");
- die(1);
+ fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
+ fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
+ exit(1);
}
// Nothing to do if config.php does not exist
if (!file_exists($configfile)) {
fwrite(STDERR, 'config.php does not exist, can not continue'); // do not localize
fwrite(STDERR, "\n");
- die(1);
+ exit(1);
}
// Include necessary libs
}
// Check that PHP is of a sufficient version as soon as possible
-if (version_compare(phpversion(), '5.2.0') < 0) {
+if (version_compare(phpversion(), '5.3.2') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
- echo "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion). ";
- echo "Please upgrade your server software or use latest Moodle 1.9.x instead.";
+ echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).<br />";
+ echo "Please upgrade your server software or install older Moodle version.";
die;
}
if (version_compare(phpversion(), "5.2.0") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN not move it after installib
- echo "Sorry, Moodle 2.0 requires PHP 5.2.8 or later (currently using version $phpversion).<br />";
- echo "Please upgrade your server software or install latest Moodle 1.9.x instead.";
+ echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).<br />";
+ echo "Please upgrade your server software or install older Moodle version.";
die;
}
if (!empty($memlimit) and $memlimit != -1) {
if (get_real_size($memlimit) < get_real_size($minrequiredmemory)) {
// do NOT localise - lang strings would not work here and we CAN not move it to later place
- echo "Sorry, Moodle 2.0 requires at least {$minrequiredmemory}B of PHP memory.<br />";
+ echo "Moodle requires at least {$minrequiredmemory}B of PHP memory.<br />";
echo "Please contact server administrator to fix PHP.ini memory settings.";
die;
}
if ($config->stage == INSTALL_ENVIRONMENT or $config->stage == INSTALL_PATHS) {
- $version_fail = (version_compare(phpversion(), "5.2.8") < 0);
+ $version_fail = (version_compare(phpversion(), "5.3.2") < 0);
$curl_fail = ($lang !== 'en' and !extension_loaded('curl')); // needed for lang pack download
$zip_fail = ($lang !== 'en' and !extension_loaded('zip')); // needed for lang pack download
echo '<div id="envresult"><dl>';
if ($version_fail) {
- $a = (object)array('needed'=>'5.2.8', 'current'=>phpversion());
+ $a = (object)array('needed'=>'5.3.2', 'current'=>phpversion());
echo '<dt>'.get_string('phpversion', 'install').'</dt><dd>'.get_string('environmentrequireversion', 'admin', $a).'</dd>';
}
if ($curl_fail) {