msphpsql icon indicating copy to clipboard operation
msphpsql copied to clipboard

Error [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired TCP Provider: Error code 0x102 php

Open gabohm opened this issue 3 years ago • 1 comments

PHP version
8.0

PHP SQLSRV or PDO_SQLSRV version
pdo_sqlsrv = 5.10.1 sqlsrv = 5.10.1

Microsoft ODBC Driver version
ODBC Driver 17

Problem description
I have the next error: [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x102 I'm using CentOS 7 Complete error: Array ( [0] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired [message] => [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired ) [1] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 258 [code] => 258 [2] => [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x102 [message] => [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x102 ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 258 [code] => 258 [2] => [Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.

I don't know if the problem is because I have 2 version of msodbcsql installed (13 and 17) And two versions of unixODBC and unixODBC-devel I attach the screenshots.

I don't think the port is the problem because the connection works fine on my local computer.

sqlsrv1 sqlsrv2

gabohm avatar Aug 05 '22 00:08 gabohm

This is usually network related, 2 versions of ODBC installed is fine. Have you tried to use isql or sqlcmd to connect to the database from CentOS?

absci avatar Aug 08 '22 22:08 absci

Close due to inactivity

absci avatar Feb 28 '23 23:02 absci