Error [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired TCP Provider: Error code 0x102 php
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.

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?
Close due to inactivity