X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=include%2Fsanity_check.php;h=8a38ec5238a552aeb282db334248213be3a69ef1;hb=07fd4f8d9d4f301f5ad88ff9e80f042fc3eb0c36;hp=7137775850feb9ffec1fbefc6cf86e998e23076d;hpb=bbd9e5045ed4276d47bd55124f81b35440849c1d;p=tt-rss.git diff --git a/include/sanity_check.php b/include/sanity_check.php index 71377758..8a38ec52 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -46,8 +46,8 @@ array_push($errors, "Please don't run this script as root."); } - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - array_push($errors, "PHP version 5.4.0 or newer required."); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + array_push($errors, "PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . "."); } if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) { @@ -70,27 +70,19 @@ array_push($errors, "Javascript cache is not writable (chmod -R 777 ".CACHE_DIR."/js)"); } - if (strlen(FEED_CRYPT_KEY) > 0 && strlen(FEED_CRYPT_KEY) != 24) { - array_push($errors, "FEED_CRYPT_KEY should be exactly 24 characters in length."); - } - - if (strlen(FEED_CRYPT_KEY) > 0 && !function_exists("mcrypt_decrypt")) { - array_push($errors, "FEED_CRYPT_KEY requires mcrypt functions which are not found."); - } - if (GENERATED_CONFIG_CHECK != EXPECTED_CONFIG_VERSION) { array_push($errors, "Configuration option checker sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh"); } - foreach ($requred_defines as $d) { + foreach ($required_defines as $d) { if (!defined($d)) { array_push($errors, "Required configuration file parameter $d is not defined in config.php. You might need to copy it from config.php-dist."); } } - if (SINGLE_USER_MODE) { + if (SINGLE_USER_MODE && class_exists("PDO")) { $pdo = DB::pdo(); $res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1"); @@ -139,6 +131,10 @@ array_push($errors, "PHP support for PostgreSQL is required for configured DB_TYPE in config.php"); } + if (!class_exists("PDO")) { + array_push($errors, "PHP support for PDO is required but was not found."); + } + if (!function_exists("mb_strlen")) { array_push($errors, "PHP support for mbstring functions is required but was not found."); } @@ -188,9 +184,9 @@ Startup failed - + - +