Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CDbConnection error in Yii

Tags:

php

mysql

pdo

yii

Whenever I am trying to login in my Yii application it is showing error like

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

I googled many hours and from many blogs I knew that I need pdo_mysql but that is already installed. In php.ini I also made comment these lines

;extension=php_pdo_mysql.dll

;extension=php_mysql.dll

and restarted apache server but still showing the same prob. I am using ubuntu 11.04. Please help me to solve the error.

like image 473
NewUser Avatar asked Jul 13 '11 07:07

NewUser


1 Answers

sudo apt-get install php5-mysql followed by sudo apache2ctl graceful worked for me on Ubuntu Desktop

like image 135
udog Avatar answered Sep 21 '22 14:09

udog