]>
Commit | Line | Data |
---|---|---|
66581886 | 1 | <? |
53558a91 | 2 | define('EXPECTED_CONFIG_VERSION', 3); |
adf702d6 | 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 | ||
9d87df8f AD |
10 | require_once "config.php"; |
11 | ||
adf702d6 AD |
12 | if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) { |
13 | print "<b>Fatal Error</b>: Your configuration file has | |
14 | wrong version. Please copy new options from <b>config.php-dist</b> and | |
15 | update CONFIG_VERSION directive."; | |
16 | exit; | |
17 | } | |
18 | ||
7c5a308d | 19 | if (RSS_BACKEND_TYPE == "magpie" && !file_exists("magpierss/rss_fetch.inc")) { |
66581886 AD |
20 | print "<b>Fatal Error</b>: You forgot to place |
21 | <a href=\"http://magpierss.sourceforge.net\">MagpieRSS</a> | |
22 | distribution in <b>magpierss/</b> | |
23 | subdirectory of TT-RSS tree."; | |
24 | exit; | |
25 | } | |
3f286c4c | 26 | |
7c5a308d AD |
27 | if (RSS_BACKEND_TYPE == "simplepie" && !file_exists("simplepie/simplepie.inc")) { |
28 | print "<b>Fatal Error</b>: You forgot to place | |
29 | <a href=\"http://simplepie.org\">SimplePie</a> | |
30 | distribution in <b>simplepie/</b> | |
31 | subdirectory of TT-RSS tree."; | |
32 | exit; | |
33 | } | |
34 | ||
35 | if (RSS_BACKEND_TYPE != "simplepie" && RSS_BACKEND_TYPE != "magpie") { | |
36 | print "<b>Fatal Error</b>: Invalid RSS_BACKEND_TYPE"; | |
37 | exit; | |
38 | } | |
39 | ||
40 | if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) { | |
41 | return "config: your config file version is incorrect. See config.php-dist."; | |
42 | } | |
adf702d6 | 43 | |
3f286c4c AD |
44 | if (file_exists("xml-export.php") || file_exists("xml-import.php")) { |
45 | print "<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b> | |
46 | and <b>xml-import.php</b>) could be used maliciously. Please remove them | |
47 | from your TT-RSS instance."; | |
48 | exit; | |
49 | } | |
51c04420 AD |
50 | |
51 | if (RSS_BACKEND_TYPE != "magpie") { | |
52 | print "<b>Fatal Error</b>: RSS backends other than magpie are not | |
53 | supported now."; | |
54 | exit; | |
55 | } | |
07280718 AD |
56 | |
57 | if (SINGLE_USER_MODE && DAEMON_UPDATE_LOGIN_LIMIT > 0) { | |
58 | print "<b>Fatal Error</b>: Please set DAEMON_UPDATE_LOGIN_LIMIT | |
59 | to 0 in single user mode."; | |
60 | exit; | |
61 | } | |
66581886 | 62 | ?> |