aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]check_setup.php5
-rwxr-xr-xinc/poche/Database.class.php4
-rwxr-xr-xindex.php2
3 files changed, 5 insertions, 6 deletions
diff --git a/check_setup.php b/check_setup.php
index 7e378b15..cf02c34b 100644..100755
--- a/check_setup.php
+++ b/check_setup.php
@@ -5,11 +5,6 @@ if (! is_writable('cache')) {
5 die('The directory "cache" must be writeable by your web server user'); 5 die('The directory "cache" must be writeable by your web server user');
6} 6}
7 7
8// Check if /db is writeable
9if (! is_writable('db') && STORAGE === 'sqlite') {
10 die('The directory "db" must be writeable by your web server user');
11}
12
13// install folder still present, need to install wallabag 8// install folder still present, need to install wallabag
14if (is_dir('install')) { 9if (is_dir('install')) {
15 require('install/index.php'); 10 require('install/index.php');
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 {
23 { 23 {
24 switch (STORAGE) { 24 switch (STORAGE) {
25 case 'sqlite': 25 case 'sqlite':
26 // Check if /db is writeable
27 if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {
28 die('An error occured: "db" directory must be writeable for your web server user!');
29 }
26 $db_path = 'sqlite:' . STORAGE_SQLITE; 30 $db_path = 'sqlite:' . STORAGE_SQLITE;
27 $this->handle = new PDO($db_path); 31 $this->handle = new PDO($db_path);
28 break; 32 break;
diff --git a/index.php b/index.php
index f191d7e7..39990d55 100755
--- a/index.php
+++ b/index.php
@@ -10,8 +10,8 @@
10 10
11define ('POCHE', '1.8.0'); 11define ('POCHE', '1.8.0');
12require 'check_essentials.php'; 12require 'check_essentials.php';
13require_once 'inc/poche/global.inc.php';
14require 'check_setup.php'; 13require 'check_setup.php';
14require_once 'inc/poche/global.inc.php';
15 15
16// Start session 16// Start session
17Session::$sessionName = 'wallabag'; 17Session::$sessionName = 'wallabag';