2 define('EXPECTED_CONFIG_VERSION', 5);
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.\n");
10 require_once "config.php";
12 if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
13 return __("config: your config file version is incorrect. See config.php-dist.\n");
16 if (defined('RSS_BACKEND_TYPE')) {
17 print __("<b>Fatal error</b>: RSS_BACKEND_TYPE is deprecated. Please remove this
18 option from config.php\n");
22 if (file_exists("xml-export.php") || file_exists("xml-import.php")) {
23 print __("<b>Fatal Error</b>: XML Import/Export tools (<b>xml-export.php</b>
24 and <b>xml-import.php</b>) could be used maliciously. Please remove them
25 from your TT-RSS instance.\n");
29 if (SINGLE_USER_MODE && DAEMON_UPDATE_LOGIN_LIMIT > 0) {
30 print __("<b>Fatal Error</b>: Please set DAEMON_UPDATE_LOGIN_LIMIT
31 to 0 in single user mode.\n");
35 if (USE_CURL_FOR_ICONS && ! function_exists("curl_init")) {
36 print __("<b>Fatal Error</b>: You have enabled USE_CURL_FOR_ICONS, but your PHP
37 doesn't seem to support CURL functions.");
41 if (!defined('SESSION_EXPIRE_TIME')) {
42 $err_msg = __("config: SESSION_EXPIRE_TIME is undefined");
45 if (SESSION_EXPIRE_TIME < 60) {
46 $err_msg = __("config: SESSION_EXPIRE_TIME is too low (less than 60)");
49 if (SESSION_EXPIRE_TIME < SESSION_COOKIE_LIFETIME) {
50 $err_msg = __("config: SESSION_EXPIRE_TIME should be greater or equal to" .
51 "SESSION_COOKIE_LIFETIME");
54 /* if (defined('DISABLE_SESSIONS')) {
55 $err_msg = "config: you have enabled DISABLE_SESSIONS. Please disable this option.";
58 if (DATABASE_BACKED_SESSIONS && SINGLE_USER_MODE) {
59 $err_msg = __("config: DATABASE_BACKED_SESSIONS is incompatible with SINGLE_USER_MODE");
62 if (DATABASE_BACKED_SESSIONS && DB_TYPE == "mysql") {
63 $err_msg = __("config: DATABASE_BACKED_SESSIONS are currently broken with MySQL");
67 print "<b>".__("Fatal Error")."</b>: $err_msg\n";