How to add a custom dll extension? SQLSRV
tchicotti opened this issue · comments
I couldn't find a way to add a custom extension like php_sqlsrv_56_ts.dll released by Microsoft Drivers do connect with Sql Server. My php.ini has only appointment to ext folder.
Anyone had be able to do it?
Well, you can download the Microsoft Drivers for PHP for SQL Server
version 3.2 (SQLSRV32.EXE
) (either by hand or with powershell), extract the downloaded executable (either by hand or with 7-zip), copy the php_sqlsrv_56_ts.dll
file to the PHP extensions directory, and enable it with this powershell command:
Enable-PhpExtension sqlsrv -Verbose
But please check that the DLL is compatible with your installed PHP.
To do so, you can compare the result of
Get-Php -Path C:\Path\To\Your\PHP\Folder
and the result of
Get-PhpExtension -Path C:\Path\To\Your\php_sqlsrv_56_ts.dll
In particular, the PHP extension must be compiled for the same major.minor version (see the PhpVersion
field of the result of Get-PhpExtension
), the same Architecture, and the same thread safety.