Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Peter Wajcowicz's avatar

Laradock can't connect to external MSSQL database.

Hi,

I have successfully configured and run laradock containers (nginx, php-fpm, workspace). When I try to connect to external MSSQL database I got an error

"Could not find driver."

When I run phpinfo() i don't see any sqlsrv.ini, pdo_sqlsrv.ini in the output.

My question is how can I force php-fpm to install mssql driver. I use php 8.1. I have set flags in .env file:

PHP_FPM_INSTALL_MSSQL=true
PHP_WORKER_INSTALL_MSSQL=true

In Dockerfile in laradock/php-fpm folder I have set the flag:

ARG INSTALL_MSSQL=true

What am I missing here?

0 likes
0 replies

Please or to participate in this conversation.