Skip to content

Commit

Permalink
added note for unsupportet php versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dwydler committed Oct 7, 2018
1 parent 875afd0 commit a1c0f71
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions index.php
Expand Up @@ -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';
Expand All @@ -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"])) ) {
Expand Down

0 comments on commit a1c0f71

Please sign in to comment.