From 164419023f4f92a80a236e8b20d7a7abb30654e0 Mon Sep 17 00:00:00 2001 From: Abdulrahman Date: Tue, 9 Jul 2019 23:30:27 +0300 Subject: [PATCH] fixes sqlite3 error --- includes/sqlite.php | 9 ++++++++- install/install.php | 1 + install/style/configs.html | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/sqlite.php b/includes/sqlite.php index 4fb630b..2044553 100755 --- a/includes/sqlite.php +++ b/includes/sqlite.php @@ -46,7 +46,14 @@ class KleejaDatabase { try { - $this->connect_id = new SQLite3(PATH . $db_name, SQLITE3_OPEN_READWRITE); + if (class_exists('SQLite3')) + { + $this->connect_id = new SQLite3(PATH . $db_name, SQLITE3_OPEN_READWRITE); + } + else + { + $this->error_msg('SQLite3 extension is not installed in your server!'); + } } catch (Exception $e) { diff --git a/install/install.php b/install/install.php index 0d13f2c..687467b 100755 --- a/install/install.php +++ b/install/install.php @@ -133,6 +133,7 @@ case 'c': $no_config = ! file_exists(PATH . 'config.php') || ig('force') ? false : true; $writeable_path = is_writable(PATH) ? true : false; + $sqlite3_exists = class_exists('SQLite3'); echo gettpl('configs.html'); diff --git a/install/style/configs.html b/install/style/configs.html index e75dfa7..d6b8e1b 100755 --- a/install/style/configs.html +++ b/install/style/configs.html @@ -10,7 +10,9 @@