mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 03:12:21 -05:00
vendor dir is not accessible before install, sqlite db dir write check moved into db class
This commit is contained in:
parent
70549136ba
commit
211068ce50
5
check_setup.php
Normal file → Executable file
5
check_setup.php
Normal file → Executable file
@ -5,11 +5,6 @@ if (! is_writable('cache')) {
|
|||||||
die('The directory "cache" must be writeable by your web server user');
|
die('The directory "cache" must be writeable by your web server user');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if /db is writeable
|
|
||||||
if (! is_writable('db') && STORAGE === 'sqlite') {
|
|
||||||
die('The directory "db" must be writeable by your web server user');
|
|
||||||
}
|
|
||||||
|
|
||||||
// install folder still present, need to install wallabag
|
// install folder still present, need to install wallabag
|
||||||
if (is_dir('install')) {
|
if (is_dir('install')) {
|
||||||
require('install/index.php');
|
require('install/index.php');
|
||||||
|
@ -23,6 +23,10 @@ class Database {
|
|||||||
{
|
{
|
||||||
switch (STORAGE) {
|
switch (STORAGE) {
|
||||||
case 'sqlite':
|
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;
|
$db_path = 'sqlite:' . STORAGE_SQLITE;
|
||||||
$this->handle = new PDO($db_path);
|
$this->handle = new PDO($db_path);
|
||||||
break;
|
break;
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
define ('POCHE', '1.8.0');
|
define ('POCHE', '1.8.0');
|
||||||
require 'check_essentials.php';
|
require 'check_essentials.php';
|
||||||
require_once 'inc/poche/global.inc.php';
|
|
||||||
require 'check_setup.php';
|
require 'check_setup.php';
|
||||||
|
require_once 'inc/poche/global.inc.php';
|
||||||
|
|
||||||
// Start session
|
// Start session
|
||||||
Session::$sessionName = 'wallabag';
|
Session::$sessionName = 'wallabag';
|
||||||
|
Loading…
Reference in New Issue
Block a user