title: Error connecting to MSSQL with SQLSrv and PHP 5.4.7
body: <p>I'm trying to connect to an MSSQL database with PHP and encounter a very frustrating error while trying to connect. It loads for a minute, before printing out the following message:</p>
  
  <pre><code>    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08001]: 
  [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. 
  </code></pre>
  
  <p>Here's my connection string:</p>
  
  <pre><code>DB::config("sqlsrv:Server={$dbHost} ; Database={$dbName}", $dbUser, $dbPass);
  </code></pre>
  
  <p>And in my DB class:</p>
  
  <pre><code>public static function config($dsn, $user, $pass)
      {
          self::$_pdo = @new PDO($dsn, $user, $pass);
          ...// intentionally left out
  </code></pre>
  
  <p>I'm very baffled. I have the following module configured in my php.ini file: extension=php_pdo_sqlsrv_54_ts.dll. Although I think I installed it right and I don't receive any error message about the driver not working, this bit of PHP prints nothing:</p>
  
  <pre><code>if (function_exists( 'sqlsrv_connect' ))
      echo "hey";
  </code></pre>
  
  <p>and as you can see from my error message above SQL Server Native Client 11 appears to be working. I'm on a Windows platform. I tried disabling the firewall to no avail. I don't have much information about the SQL server or I would share it here.</p>
  
  <p>This is my first time posting on Stack, so I apologize if I'm leaving out a key piece of information or I'm not following proper etiquette in some way, but any help is definitely appreciated.</p>
  
  <hr>
  
  <p>Also, I should add that I've already done too much Googling, and haven't had any success.</p>