Database connection errors



CDbConnection failed to open the DB connection: could not find driver

Source File


00255: {

00256: if(empty($this->connectionString))

00257: throw new CDbException(Yii::t(‘yii’,‘CDbConnection.connectionString cannot be empty.’));

00258: try

00259: {

00260: Yii::trace(‘Opening DB connection’,‘system.db.CDbConnection’);

00261: $this->_pdo=$this->createPdoInstance();

00262: $this->initConnection($this->_pdo);

00263: $this->_active=true;

00264: }

00265: catch(PDOException $e)

00266: {

00267: throw new CDbException(Yii::t(‘yii’,‘CDbConnection failed to open the DB connection: {error}’,

00268: array(’{error}’=>$e->getMessage())));

00269: }

00270: }

00271: }

Seems like you don’t have a PDO driver for the database you use…

check the phpinfo() for the installed PDO drivers


I Dn’t know my WAN IP

i can’t change php values in my server

never mind

i have use another server

the database connection success

but could not access tables

error : The table "Employee" for active record class "Employee" cannot be found in the database.



Have you created the table Employee ?

Hi, mdomba

now i got it…

the table name is small letter in database but in code Caps that is the problem…

Thanks for try to help me!