From 4f2dab357c78932ff43cf229b12c99cfb16590fb Mon Sep 17 00:00:00 2001 From: 8ctopus Date: Sun, 10 Feb 2019 10:56:08 +0500 Subject: [PATCH] the directory the SQLite database is in must be writeable --- functions.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.inc.php b/functions.inc.php index c1c1cfd4..5350f823 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1496,6 +1496,11 @@ function db_connect_with_errors() { return array($link, $error_text); } + if (!is_writeable(dirname($db))) { + $error_text = 'The directory the SQLite database is in is not writeable: '. dirname($db); + return array($link, $error_text); + } + $dsn = "sqlite:{$db}"; $username_password = false; } elseif (db_pgsql()) {