2 require_once "functions.php";
4 define('EXPECTED_CONFIG_VERSION', 7);
6 if (!file_exists("config.php")) {
7 print __("<b>Fatal Error</b>: You forgot to copy
8 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n");
12 require_once "config.php";
14 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
15 $err_msg = __("config: your config file version is incorrect. See config.php-dist.\n");
18 if (defined('RSS_BACKEND_TYPE')) {
19 print __("<b>Fatal error</b>: RSS_BACKEND_TYPE is deprecated. Please remove this
20 option from config.php\n");
24 if (file_exists("xml-export.php") || file_exists("xml-import.php")) {
25 print __("<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b>
26 and <b>xml-import.php</b>) could be used maliciously. Please remove them
27 from your TT-RSS instance.\n");
31 if (SINGLE_USER_MODE && DAEMON_UPDATE_LOGIN_LIMIT > 0) {
32 print __("<b>Fatal Error</b>: Please set DAEMON_UPDATE_LOGIN_LIMIT
33 to 0 in single user mode.\n");
37 if (USE_CURL_FOR_ICONS && ! function_exists("curl_init")) {
38 print __("<b>Fatal Error</b>: You have enabled USE_CURL_FOR_ICONS, but your PHP
39 doesn't seem to support CURL functions.");
43 if (!defined('SESSION_EXPIRE_TIME')) {
44 $err_msg = __("config: SESSION_EXPIRE_TIME is undefined");
47 if (SESSION_EXPIRE_TIME < 60) {
48 $err_msg = __("config: SESSION_EXPIRE_TIME is too low (less than 60)");
51 if (SESSION_EXPIRE_TIME < SESSION_COOKIE_LIFETIME) {
52 $err_msg = __("config: SESSION_EXPIRE_TIME should be greater or equal to" .
53 "SESSION_COOKIE_LIFETIME");
56 /* if (defined('DISABLE_SESSIONS')) {
57 $err_msg = "config: you have enabled DISABLE_SESSIONS. Please disable this option.";
60 if (DATABASE_BACKED_SESSIONS && SINGLE_USER_MODE) {
61 $err_msg = __("config: DATABASE_BACKED_SESSIONS is incompatible with SINGLE_USER_MODE");
64 if (DATABASE_BACKED_SESSIONS && DB_TYPE == "mysql") {
65 $err_msg = __("config: DATABASE_BACKED_SESSIONS are currently broken with MySQL");
69 print "<b>".__("Fatal Error")."</b>: $err_msg\n";