From 9c67b1b829290e5e78cb7da90acf285d6cd5c48f Mon Sep 17 00:00:00 2001 From: Marc Wilhelm Date: Tue, 22 Jul 2014 11:52:18 +0200 Subject: [PATCH] Split up check_setup.php into two files. The new file check_essentials.php takes care of stuff like the PHP version and is executed before the config files are included which are needed by check_setup. This patch addresses issue #773 --- check_essentials.php | 14 ++++++++++++++ check_setup.php | 15 +-------------- index.php | 3 ++- 3 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 check_essentials.php diff --git a/check_essentials.php b/check_essentials.php new file mode 100644 index 0000000..a47cd5a --- /dev/null +++ b/check_essentials.php @@ -0,0 +1,14 @@ + "short_open_tag = On"'); + } +} \ No newline at end of file diff --git a/check_setup.php b/check_setup.php index 2b84a74..7e378b1 100644 --- a/check_setup.php +++ b/check_setup.php @@ -1,25 +1,12 @@ "short_open_tag = On"'); - } -} - // Check if /cache is writeable if (! is_writable('cache')) { die('The directory "cache" must be writeable by your web server user'); } // Check if /db is writeable -if (! is_writable('db')) { +if (! is_writable('db') && STORAGE === 'sqlite') { die('The directory "db" must be writeable by your web server user'); } diff --git a/index.php b/index.php index 481841e..cce10b5 100755 --- a/index.php +++ b/index.php @@ -9,8 +9,9 @@ */ define ('POCHE', '1.7.1'); -require 'check_setup.php'; +require 'check_essentials.php'; require_once 'inc/poche/global.inc.php'; +require 'check_setup.php'; # Set error reporting level if (defined('ERROR_REPORTING')) {