As @Sharky said, it seems like your SQLSRV
extension isn't enabled. You can manually activate it by changing your php.ini
file, enabling this extension and downloading the drivers.
PHP Documentation says:
The SQLSRV extension is enabled by adding appropriate DLL file to your
PHP extension directory and the corresponding entry to the php.ini
file. The SQLSRV download comes 8 driver files, four of which are for
PDO support.
You can download the file here
https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15
https://www.microsoft.com/en-us/download/details.aspx?id=20098
Once you have downloaded the file, you have to execute it.
A box will prompt asking where you want to extract.
You can extract to wherever you want to and then copy to your php extension folder or you can directly extract to your PHP extension folder. Usually your extension folder lies in: your-php-folder\bin\php\your-php-version
or your-php-folder\bin\php
and it's called ext
. So the final path is something like this: your-php-folder\bin\php\ext
.
To enable the dll in your php.ini
file, you have to open it, and search for Extensions
then add the dll like this:
extension=name-of-your-dll-you-downloaded-and-extracted-to-the-ext-folder.dll
Example:
extension=php_sqlsrv_81_s.dll
If that doesn't work, you can try simply extension=sqlsrv_81_s
leaving out php_ and .dll