diff --git a/core/sys_config.inc.php b/core/sys_config.inc.php index 50ac40a6..abc00766 100644 --- a/core/sys_config.inc.php +++ b/core/sys_config.inc.php @@ -41,7 +41,7 @@ _d("TIMEZONE", null); // string timezone _d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable _d("EXTRA_EXTS", ""); // string optional extra extensions _d("BASE_URL", null); // string force a specific base URL (default is auto-detect) - +_d("MIN_PHP_VERSION", '5.6');// string minium supported PHP version /* * Calculated settings - you should never need to change these diff --git a/core/util.inc.php b/core/util.inc.php index 29e525b3..64b49bee 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -1600,14 +1600,17 @@ function score_assert_handler($file, $line, $code, $desc = null) { /** @privatesection */ function _version_check() { - $min_version = "5.4.8"; - if(version_compare(PHP_VERSION, $min_version) == -1) { - print " -Currently SCore Engine doesn't support versions of PHP lower than $min_version -- -if your web host is running an older version, they are dangerously out of + if(MIN_PHP_VERSION) + { + if(version_compare(phpversion(), MIN_PHP_VERSION, ">=") == FALSE) { + print " +Shimmie (SCore Engine) does not support versions of PHP lower than ".MIN_PHP_VERSION." +(PHP reports that it is version ".phpversion().") +If your web host is running an older version, they are dangerously out of date and you should plan on moving elsewhere. "; - exit; + exit; + } } }