<?php
- /*
- * WARNING!
+ /* WARNING!
*
* If you modify this file, you are ON YOUR OWN!
*
return $url_path;
}
- function initial_sanity_check($link) {
+ /**
+ * @SuppressWarnings(PHPMD.UnusedLocalVariable)
+ */
+ function initial_sanity_check() {
$errors = array();
array_push($errors, "Please don't run this script as root.");
}
- if (version_compare(PHP_VERSION, '5.3.0', '<')) {
- array_push($errors, "PHP version 5.3.0 or newer required.");
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+ array_push($errors, "PHP version 5.4.0 or newer required.");
}
if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
}
if (SINGLE_USER_MODE) {
- $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+ $result = db_query("SELECT id FROM ttrss_users WHERE id = 1");
- if ($link) {
- $result = db_query($link, "SELECT id FROM ttrss_users WHERE id = 1");
-
- if (db_num_rows($result) != 1) {
- array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found.");
- }
+ if (db_num_rows($result) != 1) {
+ array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found.");
}
}
- if (SELF_URL_PATH == "http://yourserver/tt-rss/") {
+ if (SELF_URL_PATH == "http://example.org/tt-rss/") {
$urlpath = preg_replace("/\w+\.php$/", "", make_self_url_path());
array_push($errors,
array_push($errors, "PHP support for JSON is required, but was not found.");
}
- if (DB_TYPE == "mysql" && !function_exists("mysql_connect")) {
+ if (DB_TYPE == "mysql" && !function_exists("mysqli_connect")) {
array_push($errors, "PHP support for MySQL is required for configured DB_TYPE in config.php.");
}
array_push($errors, "PHP support for hash() function is required but was not found.");
}
- if (!function_exists("ctype_lower")) {
- array_push($errors, "PHP support for ctype functions are required by HTMLPurifier.");
- }
-
- if (!function_exists("iconv")) {
- array_push($errors, "PHP support for iconv is required to handle multiple charsets.");
+ if (ini_get("safe_mode")) {
+ array_push($errors, "PHP safe mode setting is obsolete and not supported by tt-rss.");
}
- /* if (ini_get("safe_mode")) {
- array_push($errors, "PHP safe mode setting is not supported.");
- } */
-
if ((PUBSUBHUBBUB_HUB || PUBSUBHUBBUB_ENABLED) && !function_exists("curl_init")) {
array_push($errors, "PHP support for CURL is required for PubSubHubbub.");
}
<head>
<title>Startup failed</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css" href="utility.css">
+ <link rel="stylesheet" type="text/css" href="css/utility.css">
</head>
<body>
<div class="floatingLogo"><img src="images/logo_small.png"></div>
}
}
- initial_sanity_check($link);
+ initial_sanity_check();
?>