title: PHP error connecting to MS SQL database using PDO_DBLIB
body: <p>I am attempting to use PHP's PDO_DBLIB driver to connect to a remote database and am having some issues.</p>
  
  <p>The database is connectable via the same environment using telnet and a SQL client. However, connecting using the following code in PHP does not work:</p>
  
  <pre><code>&lt;?php
  $conn = new PDO('dblib:dbname=TestDB;host=RemoteServer;charset=utf8', 'my_user', 'my_pass');
  </code></pre>
  
  <p>Running this code, whether it be from the command line or Apache, yields the following error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)'</p>
  </blockquote>
  
  <p>I am able to connect to the database using the same code on a different web server, which leads me to believe that it's a configuration issue. The php.ini files on the two servers look relatively the same. They each have the same PDO libraries enabled with the same options configured.</p>
  
  <p>Does anyone have any idea why this could be happening?</p>