How to install PHP Extension SQLSRV on Azure App Service (PHP 8.2 / Linux)?

Hello,

Does anyone know how to install the PHP extension “SQLSRV” on an Azure App Service with PHP version 8.2 and Linux OS?

I tried multiple guides but none of them seem to work for me.

Thank you in advance.

While this is about PHP, I think it’s more about server configuration rather than the language itself, so I’ll move it for now.

1 Like

Azure App Service Linux - Adding PHP Extensions | Microsoft Learn ?

(Is the SQLSRV extension still in use? Shouldnt it be part of PDO at this point?)

1 Like

Thanks for that.
When running the line “pecl install sqlsrv” it goes through all the steps, but at the end it says:

compilation terminated.
make: *** [Makefile:210: conn.lo] Error 1
ERROR: `make’ failed

Do you know what could cause this?

Edit: apparently I had to use the “su” command despite being root. I successfully installed it, thanks for sharing!

1 Like