Search code examples
sql-servermacoslaravellaravel-5macos-sierra

Laravel sql server on mac


So i installed SQL serve with docker on mac and i can actually manage to access my local sql server database with datagrip, but when i want to do a php artisan migrate i get this error:

[Illuminate\Database\QueryException] could not find driver (SQL: select * from sysobjects where type = 'U' and name = migrations)

and this error

[PDOException]could not find driver

i search for some answer but they where mostly for linux.


Solution

  • So i manage to installed al the necessary drivers just by installing this: https://github.com/Microsoft/msphpsql/releases

    php and Laravel worked perfectly after i installed those package and added this lines on my php.ini file:

    extension=sqlsrv.so
    extension=pdo_sqlsrv.so