imni
453
4
General

Connecting to remote MSSQL Server from Homestead v7.9.0

Posted 1 year ago by imni

Dear friends,

Apparently the MS PHP drivers for SQL do not install on the latest homestead box.

After several silly hours with all kinds of combinations, I've managed to once again connect to my remote MSSQL Server from the latest Homestead box using the Sybase drivers. Here's what worked for me to connect to sql server 2008 r2 :

  1. get the latest homestead box using vagrant

  2. vagrant ssh into the box

  3. sudo apt-get update

  4. sudo apt-get dist-upgrade

  5. sudo apt-get install php7.2-sybase

  6. exit and vagrant reload

  7. DB_HOST = IP_ADDRESS\NAMED_INSTANCE (either in the .env or the config/database.php)

  8. comment out the PORT directive in both .env and database.php

Hope this helps

Please sign in or create an account to participate in this conversation.