title: PDO driver for XAMPP on Linux
body: <p>I'm about to gain some experience on Yii so I set up a XAMPP (1.8.1) for Linux environment and installed the Yii framework.I progress based on the book titled 'Web Application Development with Yii and PHP' and there's an example to set up database connection and test that through the Yii console by running the following code:</p>
  
  <pre><code>echo Yii::app()-&gt;db-&gt;connectionString;
  </code></pre>
  
  <p>Of course previously I created the appropriate MySQL database and set up the connection string in corresponding main.php and console.php but I'm getting an error:</p>
  
  <blockquote>
    <p>exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver' in /work/webroot/yii/framework/db/CDbConnection.php:382</p>
  </blockquote>
  
  <p>Based on Yii's requirement checker PDO for MySQL is enabled. If I check the HTML version of phpinfo it says:</p>
  
  <blockquote>
    <p>PDO Driver for MySQL: Enabled</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Client API version: mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $</p>
  </blockquote>
  
  <p>However if I run phpinfo from a Yii console it gives the following result:</p>
  
  <blockquote>
    <p>PDO support => enabled</p>
    
    <p>PDO drivers =></p>
  </blockquote>
  
  <p>So, for me it seems PDO driver is missing. I read several forum threads about how to download PDO drivers for linux and how to change the php.ini to use those drivers but I guess that solution works for CLI environment and not for XAMPP.</p>
  
  <p>Can somebody help me out here how can I set up PDO driver for MySQL database on XAMPP? I'm using Ubuntu 13.10 desktop.</p>