Search code examples
phpsqlsrvdebian-jessie

Can't Install the PHP drivers for Microsoft SQL Server Debian 8


I am trying to install PHP drivers for MSSQL Server because I get an error sqlsrv_connect is undefined

I ran the command sudo pecl install sqlsrv

and I get this error output:

Makefile:181: recipe for target 'conn.lo' failed
make: *** [conn.lo] Error 1
ERROR: `make' failed

I can't seem to find what is going on wrong here.


Solution

  • Ok I figured out the solution to this: The problem was I didn't have php-pear php7.2-dev so running the following command:

    sudo apt-get install php-pear php7.2-dev

    Then proceed with: sudo pecl install sqlsrv

    That worked!