Yii Framework Forum: Db Exception When Shift My Source Code From Windows Server 8 Into Ubuntu 12.04 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Db Exception When Shift My Source Code From Windows Server 8 Into Ubuntu 12.04 Rate Topic: -----

#1 User is offline   sirin k 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 15-March 12
  • Location:India

Posted 07 November 2013 - 02:15 PM

Db Exception When Shift my source code from XAMPP Windows Server 8 into Ubuntu 12.04

im getting the following error after shifting into apache server in ubuntu 12.04

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


Im Also Attaching the screen shot..

Let me know if any one of you have gone through this issue and fixed it.

Thanks in Advance

Attached File(s)


0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,703
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 07 November 2013 - 02:19 PM

Does your server meet minimal requirements? (see requirements.php file)
Most likely you're missing current DB driver (for example, pdo_mysql) on your system.
Either install one or use another db that is available.
For example, for ubuntu and mysql you can do it this way:
sudo apt-get install php5-mysql

God is real unless declared as integer
0

#3 User is offline   sirin k 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 15-March 12
  • Location:India

Posted 07 November 2013 - 02:24 PM

Actually i run Several Apps in my LAMP server.this exception is only for this particular app only.

Also i have checked by running php -m in terminial

PDO
pdo_mysql

Are already installed.
0

#4 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,703
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 07 November 2013 - 02:26 PM

Ok, what's in the config file (section components/db)?
God is real unless declared as integer
0

#5 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,703
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 07 November 2013 - 02:31 PM

Also, check 'cache' config.
It can use Db and different DB driver (like sqlite) which can be not installed on your system.
God is real unless declared as integer
0

#6 User is offline   sirin k 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 15-March 12
  • Location:India

Posted 11 November 2013 - 12:59 PM

Db component:
 'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=dbname',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '123',
			'charset' => 'utf8',
		),

0

#7 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,703
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 11 November 2013 - 03:11 PM

And cache?..
God is real unless declared as integer
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users