diff --git a/CHANGELOG.md b/CHANGELOG.md index fa8c6638..1e06d66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - Release v2.1.5-2023.10 🎉 - Updated utf8 & reflection type hint classes [\#320](https://github.com/torrentpier/torrentpier-lts/pull/320) ([belomaxorka](https://github.com/belomaxorka)) - Updated Text_LangCorrect class [\#309](https://github.com/torrentpier/torrentpier-lts/pull/309) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303), [\#305](https://github.com/torrentpier/torrentpier-lts/pull/305), [\#306](https://github.com/torrentpier/torrentpier-lts/pull/306), [\#307](https://github.com/torrentpier/torrentpier-lts/pull/307), [\#310](https://github.com/torrentpier/torrentpier-lts/pull/310), [\#312](https://github.com/torrentpier/torrentpier-lts/pull/312), [\#313](https://github.com/torrentpier/torrentpier-lts/pull/313), [\#315](https://github.com/torrentpier/torrentpier-lts/pull/315), [\#316](https://github.com/torrentpier/torrentpier-lts/pull/316), [\#317](https://github.com/torrentpier/torrentpier-lts/pull/317), [\#319](https://github.com/torrentpier/torrentpier-lts/pull/319), [\#321](https://github.com/torrentpier/torrentpier-lts/pull/321), [\#322](https://github.com/torrentpier/torrentpier-lts/pull/322), [\#323](https://github.com/torrentpier/torrentpier-lts/pull/323) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#297](https://github.com/torrentpier/torrentpier-lts/pull/297), [\#298](https://github.com/torrentpier/torrentpier-lts/pull/298), [\#300](https://github.com/torrentpier/torrentpier-lts/pull/300), [\#301](https://github.com/torrentpier/torrentpier-lts/pull/301), [\#302](https://github.com/torrentpier/torrentpier-lts/pull/302), [\#303](https://github.com/torrentpier/torrentpier-lts/pull/303), [\#305](https://github.com/torrentpier/torrentpier-lts/pull/305), [\#306](https://github.com/torrentpier/torrentpier-lts/pull/306), [\#307](https://github.com/torrentpier/torrentpier-lts/pull/307), [\#310](https://github.com/torrentpier/torrentpier-lts/pull/310), [\#312](https://github.com/torrentpier/torrentpier-lts/pull/312), [\#313](https://github.com/torrentpier/torrentpier-lts/pull/313), [\#315](https://github.com/torrentpier/torrentpier-lts/pull/315), [\#316](https://github.com/torrentpier/torrentpier-lts/pull/316), [\#317](https://github.com/torrentpier/torrentpier-lts/pull/317), [\#319](https://github.com/torrentpier/torrentpier-lts/pull/319), [\#321](https://github.com/torrentpier/torrentpier-lts/pull/321), [\#322](https://github.com/torrentpier/torrentpier-lts/pull/322), [\#323](https://github.com/torrentpier/torrentpier-lts/pull/323), [\#324](https://github.com/torrentpier/torrentpier-lts/pull/324) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.09](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.09) (2023-10-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08-HotFix...v2.1.5-2023.09) diff --git a/bt/includes/init_tr.php b/bt/includes/init_tr.php index 1fd8f454..3e4df23d 100644 --- a/bt/includes/init_tr.php +++ b/bt/includes/init_tr.php @@ -136,7 +136,7 @@ class sql_db $this->log_error(); if (DBG_LOG_TRACKER) { - dbg_log("Could not connect to {$this->engine} server {$this->cfg['dbhost']}", "{$this->cfg['dbhost']}-DB-connect-FAIL_" . time()); + dbg_log("Could not connect to {$this->engine} server '{$this->cfg['dbhost']}'", "{$this->cfg['dbhost']}-DB-connect-FAIL_" . time()); } } diff --git a/library/includes/cache/memcache.php b/library/includes/cache/memcache.php index 91a623f3..bedf176a 100644 --- a/library/includes/cache/memcache.php +++ b/library/includes/cache/memcache.php @@ -38,7 +38,9 @@ class cache_memcache extends cache_common if (!$this->connected && $this->cfg['con_required']) { - $con_error = "Could not connect to {$this->engine} server"; + $server = (DBG_USER) ? "'" . $this->cfg['host'] . "'" : ''; + header("HTTP/1.0 503 Service Unavailable"); + $con_error = "Could not connect to {$this->engine} server $server"; if (DBG_LOG) { @@ -102,4 +104,4 @@ class cache_memcache extends cache_common { return class_exists('Memcache'); } -} \ No newline at end of file +} diff --git a/library/includes/cache/redis.php b/library/includes/cache/redis.php index cb1c8a9b..d38a8930 100644 --- a/library/includes/cache/redis.php +++ b/library/includes/cache/redis.php @@ -38,7 +38,9 @@ class cache_redis extends cache_common if (!$this->connected && $this->cfg['con_required']) { - $con_error = "Could not connect to {$this->engine} server"; + $server = (DBG_USER) ? "'" . $this->cfg['host'] . "'" : ''; + header("HTTP/1.0 503 Service Unavailable"); + $con_error = "Could not connect to {$this->engine} server $server"; if (DBG_LOG) { diff --git a/library/includes/core/mysql.php b/library/includes/core/mysql.php index d55ddaf1..c8f10f4e 100644 --- a/library/includes/core/mysql.php +++ b/library/includes/core/mysql.php @@ -100,7 +100,7 @@ class sql_db if (!$link = @$connect_type($this->cfg['dbhost'], $this->cfg['dbuser'], $this->cfg['dbpasswd'])) { - $server = (DBG_USER) ? $this->cfg['dbhost'] : ''; + $server = (DBG_USER) ? "'" . $this->cfg['dbhost'] . "'" : ''; header("HTTP/1.0 503 Service Unavailable"); $con_error = "Could not connect to {$this->engine} server $server"; if (DBG_LOG) diff --git a/library/includes/datastore/memcache.php b/library/includes/datastore/memcache.php index cef3c8f7..26a2c86c 100644 --- a/library/includes/datastore/memcache.php +++ b/library/includes/datastore/memcache.php @@ -37,7 +37,9 @@ class datastore_memcache extends datastore_common if (!$this->connected && $this->cfg['con_required']) { - $con_error = "Could not connect to {$this->engine} server"; + $server = (DBG_USER) ? "'" . $this->cfg['host'] . "'" : ''; + header("HTTP/1.0 503 Service Unavailable"); + $con_error = "Could not connect to {$this->engine} server $server"; if (DBG_LOG) { @@ -105,4 +107,4 @@ class datastore_memcache extends datastore_common { return class_exists('Memcache'); } -} \ No newline at end of file +} diff --git a/library/includes/datastore/redis.php b/library/includes/datastore/redis.php index 8d82848b..7298e5b2 100644 --- a/library/includes/datastore/redis.php +++ b/library/includes/datastore/redis.php @@ -37,7 +37,9 @@ class datastore_redis extends datastore_common if (!$this->connected && $this->cfg['con_required']) { - $con_error = "Could not connect to {$this->engine} server"; + $server = (DBG_USER) ? "'" . $this->cfg['host'] . "'" : ''; + header("HTTP/1.0 503 Service Unavailable"); + $con_error = "Could not connect to {$this->engine} server $server"; if (DBG_LOG) {