PMCORE-2369 Kpi Report by process and Report by user does not work and the error is displayed on the taskscheduler log

This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-07-01 14:24:09 -04:00
parent 4d77676d0c
commit f647b1ffa2
4 changed files with 38 additions and 7 deletions

View File

@@ -332,11 +332,18 @@ class G
$ip = getenv('HTTP_CLIENT_IP');
} elseif (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} else {
} elseif (getenv('HTTP_X_FORWARDED')) {
$ip = getenv('HTTP_X_FORWARDED');
} elseif (getenv('HTTP_FORWARDED_FOR')) {
$ip = getenv('HTTP_FORWARDED_FOR');
} elseif (getenv('HTTP_FORWARDED')) {
$ip = getenv('HTTP_FORWARDED');
} elseif (getenv('REMOTE_ADDR')) {
$ip = getenv('REMOTE_ADDR');
}
if ($ip === false) {
} elseif (class_exists('Request')) {
$ip = Request::ip();
} else {
$ip = gethostbyname(gethostname());
}
return $ip;
}