I am trying to connect to a SQL Server that we can access through \"Microsoft SQL Server Management Studio\":
I\'ve tried a bunch of different things I\'ve seen
Conform to the list of your tries in php.ini (php_sqlsrv_XX_ts.dll
), you have activated extensions for PHP v5.5 and v5.6. But, since you are running PHP 7.0, you need to download and activate the corresponding Microsoft Drivers for PHP for SQL Server. It seems that you need to download the driver version 4.0. This is stated on the php.net page for SQLSRV extension.
The SQLSRV extension is supported by Microsoft and available for download here: http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.
Here you can find the instructions for Loading the PHP SQL Driver. You'll probably receive a file like php_sqlsrv_7_XX.dll
with XX
: "ts" or "nts" (thread safe or non-thread safe). I think you need the thread safe version.
Otherwise, use MS SQL Server (PDO) PDO driver (read the "Installation" part in the link!) with the PDO_SQLSRV DSN (connection string) and the PDO general functionality, e.g. common to all drivers. The driver will be added to the php.ini as extension=php_pdo_sqlsrv_7_ts.dll
then (check the same page for instructions: Loading the PHP SQL Driver). If you ask me, I would really choose this option.
Nota Bene: Don't forget to restart the web server and/or the db service after each change in configs!
Good luck.