Use SQLITE3_OPEN_READONLY rather than SQLITE3_OPEN_READWRITE

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-08-01 21:03:12 +02:00
parent 09882ae014
commit d448a6d6d0
+1 -1
View File
@@ -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