title: How to connect to SQL server from php (Laravel)
body: <p>On a Linux/Ubuntu box, I'm trying to connect to an external <code>SQL Server</code> database, but I only get errors. I know that the hostname, db name and credentials are correct, and I can't change them.</p>
  
  <pre><code>$odbc="odbc:Driver={SQL Server};Server=$server;Database=$database;";
  $db = new PDO($odbc, $user, $password);
  </code></pre>
  
  <p>This just gives me <code>could not find driver</code>. I have tried every tutorial I could find, and installed tons of packages, and restarted nginx over and over again. I don't know what to do next.</p>