Hi,
Platform
==========
Ubuntu
Xampp
my main.php is as below
‘db’=>array(
‘connectionString’ => ‘mysql:host=127.0.0.1;dbname=test’,
‘emulatePrepare’ => true,
‘username’ => ‘ankunda’,
‘password’ => ‘xxx’,
‘charset’ => ‘utf8’,
),
I have just installed Yii and test run ok. I can see file at localhost/yii/testdrive/index.php and requirements are passed too.
I was following manual to test db connection but i cannot connect to Database get this error when i issue model User,
exception ‘CDbException’ with message ‘CDbConnection failed to open the DB connection: could not find driver’ in /opt/lampp/htdocs/yii/framework/db/CDbConnection.php:255
However when i run this, no error is thrown through browser localhost/yii/testdrive/test.php
<?php
$dns="mysql:host=127.0.0.1;port=3306;dbname=test";
$user="root";
$pass="";
try{
$con = new PDO($dns, $user, $pass);
}catch (PDOException $e){
echo $e->getMessage();
}
?>
main.php available at www.content.akim.co.ug/main.txt and image from terminal at www.content.akim.co.ug/connection%20error.png
Am so confused, been at this for over 4hours.
Thanks