I am trying to enable sqlsrv drivers for php8.1 on Ubuntu 20.0. It is not showing the extension in phpinfo()
.
When trying to check the sqlsrv module with commmand php -m
, the output is like this:
I have followed official documentation below:
- https://learn.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver16
- Tried to add extension(
extension=pdo_sqlsrv.so
,extension=sqlsrv.so
) in /etc/php/8.1/apache2/php.ini
I am not sure what went wrong, any suggestion is appreciated.
The output of phpinfo() for php7.4:
The output of phpinfo() for php8.1:
Here are the things:
- PHP 7.4 and 8.1 installed on my machine.
- The sqlsrv drivers works fine for php7.4 version
- When trying to install/enable for php8.1 it does not work at all.
What I am missing here?