commit version 22.12.12447
This commit is contained in:
@ -32,7 +32,7 @@ if (!isset($config['install_dir'])) {
|
||||
// Include necessary supporting files
|
||||
require_once($config['install_dir'] . "/includes/common.inc.php");
|
||||
|
||||
// Die if exec/proc_open functions disabled in php.ini. This install not functional for run Observium.
|
||||
// Die if exec/proc_open functions disabled in php.ini. This configuration is not capable of running Observium.
|
||||
if (!is_exec_available()) { die; }
|
||||
|
||||
if (PHP_VERSION_ID < 80100) {
|
||||
@ -70,6 +70,7 @@ if (!isset($GLOBALS[OBS_DB_LINK]) || !$GLOBALS[OBS_DB_LINK]) {
|
||||
print_warning("WARNING: In PHP Unit tests we can skip DB connect. But if you test db functions, check your configs.");
|
||||
} else {
|
||||
print_message("%yDB not connected, please check database connection configuration.%r\nDB Error " . dbErrorNo() . ": " . dbError() . "%n", 'color');
|
||||
http_response_code(500);
|
||||
die; // Die if not PHP Unit tests
|
||||
}
|
||||
} elseif (!(isset($options['u']) || isset($options['V'])) && !get_db_version()) {
|
||||
@ -209,17 +210,11 @@ if (OBSERVIUM_EDITION === 'community') {
|
||||
}
|
||||
|
||||
// Self hostname for observium server
|
||||
// FIXME, used only in smokeping integration
|
||||
/* FIXME, used only in smokeping and ipmi integration
|
||||
if (!isset($config['own_hostname'])) {
|
||||
$config['own_hostname'] = get_localhost();
|
||||
}
|
||||
|
||||
// Set web_url/base_url setting to default, add trailing slash if not present
|
||||
|
||||
if (!isset($config['web_url'])) {
|
||||
$config['web_url'] = isset($config['base_url']) ? $config['base_url'] : 'http://' . get_localhost();
|
||||
}
|
||||
if (!str_ends($config['web_url'], '/')) { $config['web_url'] .= '/'; }
|
||||
*/
|
||||
|
||||
if (is_cli() && isset($config['external_url'])) {
|
||||
// Overwrite the autogenerated base_url with external_url when we're on CLI.
|
||||
@ -320,6 +315,13 @@ unset($i); unset($content);
|
||||
// Load phpFastCache (after load sql config!)
|
||||
include_once($config['install_dir'] . '/includes/cache.inc.php');
|
||||
|
||||
// Set web_url/base_url setting to default, add trailing slash if not present
|
||||
|
||||
if (!isset($config['web_url'])) {
|
||||
$config['web_url'] = isset($config['base_url']) ? $config['base_url'] : 'http://' . get_localhost();
|
||||
}
|
||||
if (!str_ends($config['web_url'], '/')) { $config['web_url'] .= '/'; }
|
||||
|
||||
// Generate poller id if we're a partitioned poller and we don't yet have one.
|
||||
/*
|
||||
if (isset($config['poller_id']))
|
||||
|
Reference in New Issue
Block a user