diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-19 13:47:11 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-19 13:47:11 +0100 |
commit | 60ca369cd328f4eae31005c547b9419a5ab33324 (patch) | |
tree | f9ab84e607cb54bdb0dc1d0027435af213a722f3 /check_setup.php | |
parent | 5e98c2183ae824ab6a1dd2dc22f8619a0d718977 (diff) | |
parent | b89d5a2bf48c2c1eb796963b3401aca498618ec4 (diff) | |
download | wallabag-60ca369cd328f4eae31005c547b9419a5ab33324.tar.gz wallabag-60ca369cd328f4eae31005c547b9419a5ab33324.tar.zst wallabag-60ca369cd328f4eae31005c547b9419a5ab33324.zip |
Merge pull request #468 from wallabag/dev1.5.1
1.5.1
Diffstat (limited to 'check_setup.php')
-rw-r--r-- | check_setup.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/check_setup.php b/check_setup.php new file mode 100644 index 00000000..96dd0f7d --- /dev/null +++ b/check_setup.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | // PHP 5.3 minimum | ||
4 | if (version_compare(PHP_VERSION, '5.3.3', '<')) { | ||
5 | die('This software require PHP 5.3.3 minimum'); | ||
6 | } | ||
7 | |||
8 | // Short tags must be enabled for PHP < 5.4 | ||
9 | if (version_compare(PHP_VERSION, '5.4.0', '<')) { | ||
10 | |||
11 | if (! ini_get('short_open_tag')) { | ||
12 | die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"'); | ||
13 | } | ||
14 | } | ||
15 | |||
16 | // Check PDO Sqlite | ||
17 | if (! extension_loaded('pdo_sqlite')) { | ||
18 | die('PHP extension required: pdo_sqlite'); | ||
19 | } | ||
20 | |||
21 | // Check ZIP | ||
22 | if (! extension_loaded('zip')) { | ||
23 | die('PHP extension required: zip'); | ||
24 | } | ||
25 | |||
26 | // Check if /cache is writeable | ||
27 | if (! is_writable('cache')) { | ||
28 | die('The directory "cache" must be writeable by your web server user'); | ||
29 | } | ||
30 | |||
31 | // Check if /db is writeable | ||
32 | if (! is_writable('db')) { | ||
33 | die('The directory "db" must be writeable by your web server user'); | ||
34 | } | ||
35 | |||
36 | // install folder still present, need to install wallabag | ||
37 | if (is_dir('install')) { | ||
38 | require('install/index.php'); | ||
39 | exit; | ||
40 | } \ No newline at end of file | ||