]> git.wh0rd.org - tt-rss.git/blame - sanity_check.php
new CONFIG_VERSION configuration option
[tt-rss.git] / sanity_check.php
CommitLineData
66581886 1<?
adf702d6
AD
2 define('EXPECTED_CONFIG_VERSION', 1);
3
66581886
AD
4 if (!file_exists("config.php")) {
5 print "<b>Fatal Error</b>: You forgot to copy
6 <b>config.php-dist</b> to <b>config.php</b> and edit it.";
7 exit;
8 }
9
adf702d6
AD
10 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
11 print "<b>Fatal Error</b>: Your configuration file has
12 wrong version. Please copy new options from <b>config.php-dist</b> and
13 update CONFIG_VERSION directive.";
14 exit;
15 }
16
66581886
AD
17 if (!file_exists("magpierss/rss_fetch.inc")) {
18 print "<b>Fatal Error</b>: You forgot to place
19 <a href=\"http://magpierss.sourceforge.net\">MagpieRSS</a>
20 distribution in <b>magpierss/</b>
21 subdirectory of TT-RSS tree.";
22 exit;
23 }
3f286c4c 24
adf702d6
AD
25 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
26 return "config: your config file version is incorrect. See config.php-dist.";
27 }
28
3f286c4c
AD
29 if (file_exists("xml-export.php") || file_exists("xml-import.php")) {
30 print "<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b>
31 and <b>xml-import.php</b>) could be used maliciously. Please remove them
32 from your TT-RSS instance.";
33 exit;
34 }
66581886 35?>