Check that PHP is a recent enough version (ie 4.1.0 or later)

This commit is contained in:
martin
2002-08-23 02:14:19 +00:00
parent 7b3be1b12d
commit b0cb5e2297
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -63,6 +63,14 @@
setlocale ("LC_TIME", $CFG->lang);
}
// Check that PHP is of a sufficient version
if ( ! check_php_version("4.1.0") ) {
$version = phpversion();
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)");
die;
}
// The following is a big hack to get around the problem of PHP installations
// that have "register_globals" turned off (default since PHP 4.1.0).
// Eventually I'll go through and upgrade all the code to make this unnecessary