]>
Commit | Line | Data |
---|---|---|
1d3a17c7 | 1 | <?php |
1025ad87 AD |
2 | require_once "functions.php"; |
3 | ||
1e7f3b0c | 4 | define('EXPECTED_CONFIG_VERSION', 5); |
adf702d6 | 5 | |
66581886 | 6 | if (!file_exists("config.php")) { |
d1db26aa | 7 | print __("<b>Fatal Error</b>: You forgot to copy |
dd34f155 | 8 | <b>config.php-dist</b> to <b>config.php</b> and edit it.\n"); |
66581886 AD |
9 | exit; |
10 | } | |
11 | ||
9d87df8f AD |
12 | require_once "config.php"; |
13 | ||
adf702d6 | 14 | if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) { |
d1db26aa | 15 | return __("config: your config file version is incorrect. See config.php-dist.\n"); |
7c5a308d AD |
16 | } |
17 | ||
49f9c923 | 18 | if (defined('RSS_BACKEND_TYPE')) { |
d1db26aa | 19 | print __("<b>Fatal error</b>: RSS_BACKEND_TYPE is deprecated. Please remove this |
49f9c923 | 20 | option from config.php\n"); |
7c5a308d AD |
21 | exit; |
22 | } | |
23 | ||
3f286c4c | 24 | if (file_exists("xml-export.php") || file_exists("xml-import.php")) { |
d1db26aa | 25 | print __("<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b> |
3f286c4c | 26 | and <b>xml-import.php</b>) could be used maliciously. Please remove them |
dd34f155 | 27 | from your TT-RSS instance.\n"); |
3f286c4c AD |
28 | exit; |
29 | } | |
51c04420 | 30 | |
07280718 | 31 | if (SINGLE_USER_MODE && DAEMON_UPDATE_LOGIN_LIMIT > 0) { |
d1db26aa | 32 | print __("<b>Fatal Error</b>: Please set DAEMON_UPDATE_LOGIN_LIMIT |
dd34f155 | 33 | to 0 in single user mode.\n"); |
07280718 AD |
34 | exit; |
35 | } | |
c798704b AD |
36 | |
37 | if (USE_CURL_FOR_ICONS && ! function_exists("curl_init")) { | |
d1db26aa | 38 | print __("<b>Fatal Error</b>: You have enabled USE_CURL_FOR_ICONS, but your PHP |
dd34f155 | 39 | doesn't seem to support CURL functions."); |
c798704b AD |
40 | exit; |
41 | } | |
ef8be8ea AD |
42 | |
43 | if (!defined('SESSION_EXPIRE_TIME')) { | |
d1db26aa | 44 | $err_msg = __("config: SESSION_EXPIRE_TIME is undefined"); |
ef8be8ea AD |
45 | } |
46 | ||
47 | if (SESSION_EXPIRE_TIME < 60) { | |
d1db26aa | 48 | $err_msg = __("config: SESSION_EXPIRE_TIME is too low (less than 60)"); |
ef8be8ea AD |
49 | } |
50 | ||
f7c390b8 | 51 | if (SESSION_EXPIRE_TIME < SESSION_COOKIE_LIFETIME) { |
d1db26aa | 52 | $err_msg = __("config: SESSION_EXPIRE_TIME should be greater or equal to" . |
f7c390b8 | 53 | "SESSION_COOKIE_LIFETIME"); |
ef8be8ea AD |
54 | } |
55 | ||
ec83ae9f | 56 | /* if (defined('DISABLE_SESSIONS')) { |
ef8be8ea | 57 | $err_msg = "config: you have enabled DISABLE_SESSIONS. Please disable this option."; |
ec83ae9f | 58 | } */ |
ef8be8ea AD |
59 | |
60 | if (DATABASE_BACKED_SESSIONS && SINGLE_USER_MODE) { | |
d1db26aa | 61 | $err_msg = __("config: DATABASE_BACKED_SESSIONS is incompatible with SINGLE_USER_MODE"); |
ef8be8ea AD |
62 | } |
63 | ||
333f0b2a | 64 | if (DATABASE_BACKED_SESSIONS && DB_TYPE == "mysql") { |
d1db26aa | 65 | $err_msg = __("config: DATABASE_BACKED_SESSIONS are currently broken with MySQL"); |
333f0b2a AD |
66 | } |
67 | ||
ef8be8ea | 68 | if ($err_msg) { |
d1db26aa | 69 | print "<b>".__("Fatal Error")."</b>: $err_msg\n"; |
ef8be8ea AD |
70 | exit; |
71 | } | |
72 | ||
66581886 | 73 | ?> |