title: Invalid Data Source PHP PDO Mysql
body: <pre><code>&lt;?php
  #require_once('inc/dbc1.php');
  $dsn = 'mysql:dbname=dbname;host=somehost;
  $user = 'someuser';
  $password = 'SomePass';
  
  try {
      $dbh = new PDO($dsn, $user, $password);
  } catch (PDOException $e) {
      echo 'Connection failed: ' . $e-&gt;getMessage();
  }
  
  $pdo1 = new PDO($dsn, $user, $password);
  $pdo1-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
  $sth1 = $pdo1-&gt;prepare('SELECT pID, lname, fname FROM Professor ORDER BY pID DESC LIMIT 5;');
  $sth1-&gt;execute(array());
  ?&gt;
  </code></pre>
  
  <p>Throws the error:</p>
  
  <pre><code>Uncaught exception 'PDOException' with message 'invalid data source name' in  PDO-&gt;__construct('', NULL, NULL) on line 1
  </code></pre>
  
  <p>Anyone see anything wrong with this?</p>