I'm trying to enable the sqlsrv driver for php8.1 on Ubuntu 20.0. It doesn't show the extension inphpinfo()
.
When trying to check the sqlsrv module using the commandphp -m
, the output is as follows:
I followed the following official documentation:
extension=pdo_sqlsrv.so
,extension=sqlsrv.so
)I'm not sure what's going wrong, any suggestions would be appreciated.
The output of phpinfo() for php7.4:
The output of phpinfo() for php8.1:
The thing is like this:
What am I missing here?
I was able to solve this problem by adding the following commands.
You need to restart apache2 afterward
You can try this:
Please note that
-r, --register-only
will not delete the file, but will only register the package as not installed.Check out this resource for more information.https://github.com/microsoft/msphpsql/issues/1145#issuecomment- 649682231