sanity: add php version check

This commit is contained in:
Andrew Dolgov 2012-08-23 23:17:32 +04:00
parent 4c97d1f6af
commit 79f946be6f
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@
array_push($errors, "Please don't run this script as root."); array_push($errors, "Please don't run this script as root.");
} }
if (version_compare("5.2.0", phpversion()) == 1) {
array_push($errors, "PHP version 5.2.0 or newer required.");
}
if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) { if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value."); array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
} }