From a1c0f710a5e71cde27170f5c95942f1d0d4d0cc7 Mon Sep 17 00:00:00 2001 From: Whitemoon Date: Sun, 7 Oct 2018 23:23:53 +0200 Subject: [PATCH] added note for unsupportet php versions --- index.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 018bf70..25d1efd 100644 --- a/index.php +++ b/index.php @@ -24,6 +24,17 @@ $_SESSION['csrf'] = bin2hex(openssl_random_pseudo_bytes(32)); } +// check if php pdo for sqlite installed on server + if( !in_array("sqlite",PDO::getAvailableDrivers()) ) { + + exit('PDO driver for SQLite is not installed on this system.'); + } + + //check php version + if (version_compare(phpversion(), '5.6.0', '<')) { + exit('This PHP Version '.phpversion().' is not supportet.'); + } + // lazy config check/load if (file_exists('LookingGlass/Config.php')) { require 'LookingGlass/Config.php'; @@ -36,12 +47,6 @@ exit('Config.php does not exist. Please run configure.sh.'); } -// check if php pdo for sqlite installed on server - if( !in_array("sqlite",PDO::getAvailableDrivers()) ) { - - exit('PDO driver for SQLite is not installed on this system.'); - } - // include multi language sytem if ( (isset($_GET["lang"])) && (preg_match("/^[a-z]{2}\_[A-Z]{2}$/",$_GET["lang"])) ) {