-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
First thank for your work.
I'm on a project that use your PdoServiceProvider and i detect a problem when you use it with sqlsrv and some named instance.
In named instance the port is dynamcally assigned, but in sqlSrvConfig you set the default port to 1433.
If in your config file you set port to null you've got a wrong server string that look like
new PDO('sqlsrv:localhost,; ...
(the comma after localhost is the problem).
And if you do not set the port you got a TCP error :
TCP Provider: No connection could be made because the target machine actively refused it.
I suggest this in your sqlSrvConfig file, L.34 :
$params['server'] = $params['host'];
if(!empty($params['port'])) $params['server'] .= ",".$params['port'];
so If the user want, he can define the value null for the port.
Bye.
Metadata
Metadata
Assignees
Labels
No labels