From: Andrew Dolgov Date: Wed, 5 Jul 2017 19:46:05 +0000 (+0300) Subject: sanity: it's probably a good idea to check whether we're running under httpd before... X-Git-Tag: 17.12~150 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2953687b7242f77d9bc5cbea7cf21d2fb9f2de1a;p=tt-rss.git sanity: it's probably a good idea to check whether we're running under httpd before enforcing SELF_URL_PATH checks --- diff --git a/include/sanity_check.php b/include/sanity_check.php index b8a5acb1..f9f6575c 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -105,7 +105,7 @@ "Please set SELF_URL_PATH to the correct value for your server (possible value: $ref_self_url_path)"); } - if (SELF_URL_PATH != $ref_self_url_path && (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS)) { + if (isset($_SERVER["HTTP_HOST"]) && SELF_URL_PATH != $ref_self_url_path && (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS)) { array_push($errors, "Please set SELF_URL_PATH to the correct value detected for your server: $ref_self_url_path"); }