SQL connection only works on local machine

I have PHP app that connects to remote SQL server. I use php_sqlsrv extension and ODBC.

When I convert app with ExeOutput and load php_sqlsrv_71_nts_x86.dll and php_odbc.dll and app works as expected if I run it on SQL server itself or on other WIN machine that have ODBC drivers installed.

If I run app on machine that do not have ODBC installed I get error and msg that ODBC driver should be installed.

Full error msg:
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x86: System requirements - PHP drivers for SQL Server | Microsoft Docs [message] => This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x86: System requirements - PHP drivers for SQL Server | Microsoft Docs ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )

Is that expected behavior? I would expect that if I install php_odbc it should work on any WIN machine…

Server is accesible to all machines via default 1433 port. Any suggestion? I really do not like idea of installing ODBC on each machine…

Any suggestion what I can do would be appriciated.

Thanks Alex

Indeed, you’ll have to install the driver on all machines. That’s possible with an installer for your application.