From d448a6d6d0983abe941094040b21fe5e46078ef5 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 1 Aug 2017 21:03:12 +0200 Subject: [PATCH] Use SQLITE3_OPEN_READONLY rather than SQLITE3_OPEN_READWRITE Signed-off-by: DL6ER --- api_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_db.php b/api_db.php index bc1c310e..7090ed49 100644 --- a/api_db.php +++ b/api_db.php @@ -21,7 +21,7 @@ function SQLite3_connect($trytoreconnect) { try { // connect to database - return new SQLite3('/etc/pihole/pihole-FTL.db', SQLITE3_OPEN_READWRITE); + return new SQLite3('/etc/pihole/pihole-FTL.db', SQLITE3_OPEN_READONLY); } catch (Exception $exception) { // sqlite3 throws an exception when it is unable to connect, try to reconnect after 3 seconds