Project

General

Profile

Actions

Bug #63070

closed

ADOdb: mssqlnative driver does not properly define the port

Added by Manuel Schneider about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2014-11-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

One of our extension has a depency on the adodb extension.

This extension connect to a mssql (Microsoft SQL 2005) server. If the connection use the default port (1433) there is no problem. But my dns string look like this:
mssql://user:password@192.168.1.1:12345/databasename

After I try to connect I get an error with the message

coult not connect to server 192.168.1.1 ....

The port is missing. After a little debugging I found the bug. In file typo3/sysext/adodb/adodb/adodb.inc.php on line 4378 the adodb class try to connect with the function $this->Connect

$ok = $obj->Connect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']);

As you can see the port is missing, after inserting the port it works

$ok = $obj->Connect($dsna['host'] . ':' . $dsna['port'], $dsna['user'], $dsna['pass'], $dsna['path']);

Actions

Also available in: Atom PDF