title: PDO cannot find ODBC driver
body: <p>Trying to migrate to PDO for an ODBC connection to a remote database.</p>
  
  <p>My system is Windows 7 Pro, with a FortiClient VPN connection to the remote domain, and Tunnel Mode connected.  (<em>Added in edit:</em> Running PHP 5.4, so PDO should be installed by default.)</p>
  
  <p>The data source configuration in the Windows 7 ODBC Data Source Administrator is as follows (some names changed for security):</p>
  
  <ul>
  <li>Under <em>System DSN</em>:
  <ul>
  <li><em>System Data Source Name</em> = 'TheBigDB'</li>
  <li><em>Driver</em> = 'Oracle in instantclient_11_2' <i>(64-bit)</i></li>
  <li><em>TNS Service Name</em> = '10.10.1.20:1521/BIGDB'</li>
  <li><em>UserID</em> = 'BigDBUser'</li>
  <li>All other settings are defaults for installation of driver</li>
  </ul></li>
  </ul>
  
  <p>The following piece of PHP non-PDO code is able to create a connection usable for queries:</p>
  
  <pre><code>    if (!($myConn = odbc_connect('TheBigDB','BigDBUser','myPwd'))) {
          echo "No ODBC connection&lt;br /&gt;";
      }
  </code></pre>
  
  <p>So I can connect to the database.  The problem is doing it in PDO.  The following PHP...</p>
  
  <pre><code>    try {
          $odbcConn = new PDO('odbc:Driver={Oracle in instantclient_11_2};Server=10.10.1.20:1521;Database=BIGDB;Uid=BigDBUser;Pwd=myPwd');
      } catch (PDOException $e) {
          echo 'PDO connection failed: ' . $e-&gt;getMessage();
      }
  </code></pre>
  
  <p>... results in a <i>PDO connection failed: could not find driver</i> message.  My first try relied more heavily on the Data Sources Administrator; that looked like this:</p>
  
  <pre><code>    try {
          $odbcConn = new PDO('MyBigDB','BigDBUser','myPwd');
      } catch (PDOException $e) {
          echo 'PDO connection failed: ' . $e-&gt;getMessage();
      }
  </code></pre>
  
  <p>Same thing -- <i>could not find driver</i>.</p>
  
  <p>So here's my question: <strong>Given a Windows 7 system with ODBC through a VPN connection to an Oracle database that all seems to work without PDO, how do I migrate the connection parameters to create a PDO connection?</strong>  Maybe a better question is why mess with PDO for the connection, but I keep reading that PDO is more secure, so I'm trying to use it.</p>