diff options
| author | David M <davidmj@users.sourceforge.net> | 2007-07-30 03:16:31 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2007-07-30 03:16:31 +0000 |
| commit | 35152dcd537a092d19696f07cf62048939041a25 (patch) | |
| tree | 46bd537a2404e1873c1c1cf37a8bd4400f5cfcaf | |
| parent | d7ae4540794708fe79fb9fff682935a3fa05d258 (diff) | |
| download | forums-35152dcd537a092d19696f07cf62048939041a25.tar forums-35152dcd537a092d19696f07cf62048939041a25.tar.gz forums-35152dcd537a092d19696f07cf62048939041a25.tar.bz2 forums-35152dcd537a092d19696f07cf62048939041a25.tar.xz forums-35152dcd537a092d19696f07cf62048939041a25.zip | |
#13874
git-svn-id: file:///svn/phpbb/trunk@7981 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
| -rw-r--r-- | phpBB/includes/db/mssql.php | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index a8a0349adf..98bda631b5 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -190,6 +190,7 @@ p a { <ul class="menu"> <li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li> + <li>[Fix] Allow MS SQL to properly connect when using the mssql driver and PHP is less than either 4.4.1 or 5.1 (Bug #13874)</li> </ul> diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 422a5d44a4..f07d1adfe9 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -39,7 +39,14 @@ class dbal_mssql extends dbal @ini_set('mssql.textlimit', 2147483647); @ini_set('mssql.textsize', 2147483647); - $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link); + if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>='))) + { + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link); + } + else + { + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword); + } if ($this->db_connect_id && $this->dbname != '') { |
