Yii Framework Forum: CDbConnection failed to open the DB connection: could not find driver - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   StErMi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 259
  • Joined: 30-March 09

Posted 07 November 2009 - 04:54 AM

Quote

CDbException
Description

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

/membri/todolistapp/yii-svn/framework/db/CDbConnection.php(262)

00250: {
00251: if(empty($this->connectionString))
00252: throw new CDbException(Yii::t('yii','CDbConnection.connectionString cannot be empty.'));
00253: try
00254: {
00255: Yii::trace('Opening DB connection','system.db.CDbConnection');
00256: $this->_pdo=$this->createPdoInstance();
00257: $this->initConnection($this->_pdo);
00258: $this->_active=true;
00259: }
00260: catch(PDOException $e)
00261: {
00262: throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection: {error}',
00263: array('{error}'=>$e->getMessage())));
00264: }
00265: }
00266: }
00267:
00268: /**
00269: * Closes the currently active DB connection.
00270: * It does nothing if the connection is already closed.
00271: */
00272: protected function close()
00273: {
00274: Yii::trace('Closing DB connection','system.db.CDbConnection');

Stack Trace

#0 /membri/todolistapp/yii-svn/framework/db/CDbConnection.php(237): CDbConnection->open()
#1 /membri/todolistapp/yii-svn/framework/db/CDbConnection.php(216): CDbConnection->setActive(true)
#2 /membri/todolistapp/yii-svn/framework/base/CModule.php(357): CDbConnection->init()
#3 /membri/todolistapp/yii-svn/framework/base/CApplication.php(391): CModule->getComponent('db')
#4 /membri/todolistapp/yii-svn/framework/db/ar/CActiveRecord.php(526): CApplication->getDb()
#5 /membri/todolistapp/yii-svn/framework/db/ar/CActiveRecord.php(1896): CActiveRecord->getDbConnection()
#6 /membri/todolistapp/yii-svn/framework/db/ar/CActiveRecord.php(328): CActiveRecordMetaData->__construct(Object(User))
#7 /membri/todolistapp/todolist/protected/models/User.php(22): CActiveRecord::model('User')
#8 /membri/todolistapp/todolist/protected/controllers/SiteController.php(35): User::model()
#9 /membri/todolistapp/yii-svn/framework/web/actions/CInlineAction.php(32): SiteController->actionIndex()
#10 /membri/todolistapp/yii-svn/framework/web/CController.php(300): CInlineAction->run()
#11 /membri/todolistapp/yii-svn/framework/web/CController.php(278): CController->runAction(Object(CInlineAction))
#12 /membri/todolistapp/yii-svn/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array)
#13 /membri/todolistapp/yii-svn/framework/web/CWebApplication.php(320): CController->run('')
#14 /membri/todolistapp/yii-svn/framework/web/CWebApplication.php(120): CWebApplication->runController('')
#15 /membri/todolistapp/yii-svn/framework/base/CApplication.php(135): CWebApplication->processRequest()
#16 /membri/todolistapp/todolist/index.php(26): CApplication->run()
#17 {main}

2009-11-07 11:11:02 Apache Yii Framework/1.1rc-dev


Ok this is what i did: installed in locale yii, created the project. Than I copied all ( yii folder, project folder ) to my web hosting ( where I don't have the remote access ). Configured the main.php with the db connection parameters. But when I try to do something this is the error.

Have I missed something during the copy? Or the problem is that I can't copy the yii folder? (I'm using the last svn version )
0

#2 User is offline   StErMi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 259
  • Joined: 30-March 09

Posted 07 November 2009 - 05:01 AM

Maybe the answer is here: PDO drivers sqlite2, sqlite

I need the mysql pdo right? TT

Ok couse I'm at this point can you say me which are the yii require to works?
0

#3 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 07 November 2009 - 05:13 AM

View PostStErMi, on 07 November 2009 - 05:01 AM, said:

Maybe the answer is here: PDO drivers sqlite2, sqlite

I need the mysql pdo right? TT

Ok couse I'm at this point can you say me which are the yii require to works?


Yes you need PDO. There's a "requirements" folder in the standard Yii package. Upload that to your host and then run the index.php (eg http://example.com/requirements/).
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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