I have a laravel application that connect a sql server db on Azure.
On my local Wamp server the application works. I have installed on my linux server using a docker image, and don't connect the Azure DB. Every time returns this error message:
SQLSTATE[HYT00]: [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (SQL: select * from [mytable])
MSDOBC Driver, sqlsrv and pdo_sqlsrv are correctly installed.
I suppose is something related with laravel because if I query the db with a php script works without problem.
My .ENV file has db settings:
DB_CONNECTION=sqlsrv
DB_HOST=db.database.windows.net
DB_PORT=1433
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=pwd
Laravel log and docker log don't tell nothing interesting, I don't have any idea how to solve.