Laravel Homestead DoctrineDBALException Call to undefined function sqlsrv_configure()

  doctrine, homestead, php, symfony

I need to check an old Symfony application on Laravel Homestead that uses SQL Server as DB engine.

When I run the app I get the following error:

DoctrineDBALException: An exception occurred while executing ‘
SELECT THE QUERY
ON MSSQLSERVER
‘:

Call to undefined function sqlsrv_configure()

at vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:185 at
DoctrineDBALDBALException::wrapException()
(vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:159) at DoctrineDBALDBALException::driverExceptionDuringQuery()
(vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:2121) at DoctrineDBALConnection->handleExceptionDuringQuery()
(vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1213) at DoctrineDBALConnection->prepare()

I have searched in other posts, but they’re not clear on how to install the appropiate extensions.

Can anyone shed some light on how to solve this?

Source: Ask PHP

LEAVE A COMMENT