• Discussion
  • how to add extension sqlsrv & pdo_sqlsrv to php (nginx)

This sort of work, you need to enable microsoft's repo first otherwise you won't be able to install msodbcsql. For CentOS7 it is:

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo

And after you are done, you will have to use PDO instead of sqlsrv to connect.

4 months later
2 months later
14 days later

you may have missed a step in the tutorial Bumb1ebe. So, reinstall PHP and try again to follow the tutorial.

4 months later

Please share steps for how to add sqlsrv or mssql extension add in php7.0 version.

OS:- 20.04.4 LTS (Focal Fossa)
aaPanelLinux panel used.

a year later