Commit 7abb6793 authored by Aaron Wells's avatar Aaron Wells
Browse files

Pass the $CFG->dbport to ADODB separately from the hostname

Bug1247715: The mysqli driver doesn't support sending "hostname:port" but it and
the others do support setting a $db->port field manually.

Change-Id: I4f145d8a424717dbb9bed53f78cfc01f521c9dae
parent a9958040
......@@ -122,8 +122,10 @@ try {
if (empty($CFG->dbhost)) {
$CFG->dbhost = '';
else if (!empty($CFG->dbport)) {
$CFG->dbhost .= ':'.$CFG->dbport;
// The ADODB connection function doesn't have a separate port argument, but the
// postgres7, mysql, and mysqli drivers all support a $this->dbport field.
if (!empty($CFG->dbport)) {
$db->port = $CFG->dbport;
if (!empty($CFG->dbpersist)) { // Use persistent connection (default)
$dbconnected = $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment