aboutsummaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-07-18 12:01:26 +0200
committerThomas Citharel <tcit@tcit.fr>2015-07-18 12:01:26 +0200
commit828d008bed8ef9abba047df16e5e09d8133bd3f3 (patch)
tree7e9fbc137fc4a4af70b05ce522ee37a61f445263 /install
parentc129374147de3da613bf10124778ee59070d2a66 (diff)
downloadwallabag-828d008bed8ef9abba047df16e5e09d8133bd3f3.tar.gz
wallabag-828d008bed8ef9abba047df16e5e09d8133bd3f3.tar.zst
wallabag-828d008bed8ef9abba047df16e5e09d8133bd3f3.zip
fixed a postgresql-related bug, more database functions secured and add an exception for sqlite at installation
Diffstat (limited to 'install')
-rwxr-xr-xinstall/index.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/install/index.php b/install/index.php
index bb351095..ea5d7d47 100755
--- a/install/index.php
+++ b/install/index.php
@@ -94,10 +94,14 @@ else if (isset($_POST['install'])) {
94 $errors[] = 'Impossible to create the SQLite database file. Please check your file permissions.'; 94 $errors[] = 'Impossible to create the SQLite database file. Please check your file permissions.';
95 } 95 }
96 else { 96 else {
97 $db_path = 'sqlite:' . realpath('') . '/db/poche.sqlite'; 97 try {
98 $handle = new PDO($db_path); 98 $db_path = 'sqlite:' . realpath('') . '/db/poche.sqlite';
99 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 99 $handle = new PDO($db_path);
100 $sql_structure = ""; 100 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
101 $sql_structure = "";
102 } catch (PDOException $e) {
103 $errors[] = "SQLite has encountered an issue : " . $e->getMessage();
104 }
101 } 105 }
102 } else { 106 } else {
103 // MySQL and Postgre 107 // MySQL and Postgre