title: Uncaught PDOException: fetch mode requires colno - but only on production server
body: <p>I've been migrating a website from one server to another. The code is massive, so naturally I've had my share of problems. I believe they're all solved <strong>except</strong> for this persistent one:</p>
  
  <p>On a particular page, I get the following error:</p>
  
  <pre><code>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: fetch mode requires the colno argument' in /home/username/public_html/admin/lib/database.inc.php:59
  </code></pre>
  
  <p>The line referenced:</p>
  
  <pre><code>$myResult-&gt;setFetchMode(PDO::FETCH_COLUMN);
  </code></pre>
  
  <p>I've been back and forth through the PDO documentation, so my diagnosis was originally that setting the fetch mode to PDO::FETCH_COLUMN required also setting a column number - no great deduction there. So I tried a value of 0 as the second argument. The page spent more than 30 seconds loading and got a PHP timeout. Same for a value of 1, and then I decided this wasn't the path to success.</p>
  
  <p>Now, the really perplexing thing is that this site works perfectly on my local test machine without any modification, as well as on the original production server. I don't have easy access to the specs on the old server, but I know that those of my local test machine match those of the new server pretty damn closely.</p>
  
  <p>Specifically:</p>
  
  <p>Local PHP: 5.3.3</p>
  
  <p>Remote PHP: 5.3.4</p>
  
  <p>Local MySQL: 5.1.37</p>
  
  <p>Remote MySQL: 5.0.91</p>
  
  <p>Since I know the code is good <em>with some configuration</em>, I'm hoping someone knows the magic switch I can flip.</p>
  
  <p><strong>--EDIT--</strong></p>
  
  <p>Even with error_reporting set to E_ALL | E_STRICT on the local machine, this PDO exception doesn't appear.</p>