Skip to content

Commit

Permalink
Fix drivers selecting mysqlnd-backed mysqli extension
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Aug 29, 2016
1 parent b01d9c8 commit c9da031
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ RDBMS support for the XP Framework: MySQL, Sybase, MSSQL, PostgreSQL, SQLite3, I

## ?.?.? / ????-??-??

## 9.0.2 / 2016-08-29

* Fixed drivers selecting mysqlnd-backed mysqli extension, which leads
to *mysqlnd cannot connect to MySQL 4.1+* errors
(@thekid)

## 9.0.1 / 2016-08-29

* Added compatibility with xp-framework/networking v8.0.0 - @thekid
Expand Down
4 changes: 3 additions & 1 deletion src/main/php/rdbms/DefaultDrivers.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class DefaultDrivers extends DriverImplementationsProvider {
static function __static() {

// MySQL support: Use mysqli extension by default, mysql otherwise. Never use mysqlnd!
if (extension_loaded('mysqli')) {
if (extension_loaded('mysqlnd')) {
self::$impl['mysql']= ['rdbms.mysqlx.MySqlxConnection', 'rdbms.mysqli.MySQLiConnection', 'rdbms.mysql.MySQLConnection'];
} else if (extension_loaded('mysqli')) {
self::$impl['mysql']= ['rdbms.mysqli.MySQLiConnection', 'rdbms.mysql.MySQLConnection', 'rdbms.mysqlx.MySqlxConnection'];
} else if (extension_loaded('mysql')) {
self::$impl['mysql']= ['rdbms.mysql.MySQLConnection', 'rdbms.mysqli.MySQLiConnection', 'rdbms.mysqlx.MySqlxConnection'];
Expand Down

0 comments on commit c9da031

Please sign in to comment.