X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=inc%2Fpoche%2FDatabase.class.php;h=dfd7ae349052964680d90a680d8e0413b893ef59;hb=aa1083bdac8c20285f9ee6822768cc75145c06d4;hp=2c80b64b5dff24687777be87754134057be01091;hpb=6da20812ce04e3e45c21c6da640d6ccde91e8c38;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 2c80b64b..dfd7ae34 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -23,6 +23,10 @@ class Database { { switch (STORAGE) { case 'sqlite': + // Check if /db is writeable + if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) { + die('An error occured: "db" directory must be writeable for your web server user!'); + } $db_path = 'sqlite:' . STORAGE_SQLITE; $this->handle = new PDO($db_path); break;