RedHat 9 - SQLSTATE[HYT00]: [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired
workcd opened this issue · 5 comments
Please check the FAQ (frequently-asked questions) first. If you have other questions or something to report, please address the following (skipping questions might delay our responses):
PHP version - PHP 8.0.3
PHP SQLSRV or PDO_SQLSRV version - 5.11.1
Microsoft ODBC Driver version - msodbcsql17 - 17.10.4.1 & unixODBC - 2.3.11
SQL Server version - 2012
Client operating system RedHat 9.4
Table schema - N/A
Problem description - SQLSTATE[HYT00]: [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired
Expected behavior and actual behavior - ODBC/SQLServer drive works when tested using isql to connect to database which fails with PHP.
Repro code or steps to reproduce - $conn = new PDO("sqlsrv:Server=*****************;Database=database", "username", "password");
This sounds like the SQL server might not be accessible from that machine. Can you try to connect to it via just ODBC isql -v -k "<CONNECTION STRING>"
?
Hi, it works with isql, it's just when I test it using PHP that this happens, thanks
Found issue, selinux
Fixed.
Spoke too soon, I am now seeing a different error:
-- SQLSTATE[28000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user '********'.
If I test the login with using iSQL it works.