From e17ebddf11b7867bdf47529828404cc9d961c485 Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Mon, 26 Jun 2023 18:57:59 +0200 Subject: [PATCH 1/4] Fix sqlsrv default port connection refuse ~ ignore default port when constructr hostname for sqlsrv driver --- system/Database/SQLSRV/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 4e0ca987df9a..445c6bf5426b 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -121,7 +121,7 @@ public function connect(bool $persistent = false) unset($connection['UID'], $connection['PWD']); } - if (strpos($this->hostname, ',') === false && $this->port !== '') { + if (strpos($this->hostname, ',') === false && $this->port !== '' && (int)$this->port !== 1433) { $this->hostname .= ', ' . $this->port; } From 29d6ddd2c26cd516800430ae880ae585eceba2bb Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Tue, 27 Jun 2023 12:14:58 +0200 Subject: [PATCH 2/4] Confirm Style Guide ~ add missing space (style guide) --- system/Database/SQLSRV/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 445c6bf5426b..555b0a21c3f1 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -121,7 +121,7 @@ public function connect(bool $persistent = false) unset($connection['UID'], $connection['PWD']); } - if (strpos($this->hostname, ',') === false && $this->port !== '' && (int)$this->port !== 1433) { + if (strpos($this->hostname, ',') === false && $this->port !== '' && (int) $this->port !== 1433) { $this->hostname .= ', ' . $this->port; } From a7b97ad34e2198229708ddc440399174ebf237df Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Wed, 28 Jun 2023 15:11:34 +0200 Subject: [PATCH 3/4] Provide default port configuration information to the documentation ~ remove old port changes + add port config information to the documentation --- system/Database/SQLSRV/Connection.php | 2 +- user_guide_src/source/database/configuration.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 555b0a21c3f1..4e0ca987df9a 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -121,7 +121,7 @@ public function connect(bool $persistent = false) unset($connection['UID'], $connection['PWD']); } - if (strpos($this->hostname, ',') === false && $this->port !== '' && (int) $this->port !== 1433) { + if (strpos($this->hostname, ',') === false && $this->port !== '') { $this->hostname .= ', ' . $this->port; } diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index bdb6320d0bb3..d2b6b893abe6 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -174,7 +174,7 @@ Explanation of Values: **compress** Whether or not to use client compression (``MySQLi`` only). **strictOn** true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application (``MySQLi`` only). -**port** The database port number. +**port** The database port number - Empty for default port (or dynamic port with ``SQLSRV``) **foreignKeys** true/false (boolean) - Whether or not to enable Foreign Key constraint (``SQLite3`` only). .. important:: SQLite3 Foreign Key constraint is disabled by default. From 757de43da5813a62633e1ce183dd0527d8f39c7f Mon Sep 17 00:00:00 2001 From: puschie286 Date: Thu, 29 Jun 2023 10:39:51 +0200 Subject: [PATCH 4/4] Update user_guide_src/source/database/configuration.rst Co-authored-by: kenjis --- user_guide_src/source/database/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index d2b6b893abe6..077231fa3dca 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -174,7 +174,7 @@ Explanation of Values: **compress** Whether or not to use client compression (``MySQLi`` only). **strictOn** true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application (``MySQLi`` only). -**port** The database port number - Empty for default port (or dynamic port with ``SQLSRV``) +**port** The database port number - Empty string ``''`` for default port (or dynamic port with ``SQLSRV``). **foreignKeys** true/false (boolean) - Whether or not to enable Foreign Key constraint (``SQLite3`` only). .. important:: SQLite3 Foreign Key constraint is disabled by default.