CDbException

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

D:\localuser\hndcyg\web\framework\db\CDbConnection.php(399)

387                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
388             try
389             {
390                 Yii::trace('Opening DB connection','system.db.CDbConnection');
391                 $this->_pdo=$this->createPdoInstance();
392                 $this->initConnection($this->_pdo);
393                 $this->_active=true;
394             }
395             catch(PDOException $e)
396             {
397                 if(YII_DEBUG)
398                 {
399                     throw new CDbException('CDbConnection failed to open the DB connection: '.
400                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
401                 }
402                 else
403                 {
404                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
405                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
406                 }
407             }
408         }
409     }
410 
411     /**

Stack Trace

#7
+
 D:\localuser\hndcyg\web\protected\components\Controller.php(25): CActiveRecord->findByPk(1)
20      * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
21      * for more details on how to specify this property.
22      */
23     public $breadcrumbs=array();
24     public function init(){
25         $this->optionInfo=Option::model()->findByPk(1);
26     }
27 }
#11
+
 D:\localuser\hndcyg\web\common.php(13): CApplication->run()
08 // specify how many levels of call stack should be shown in each log message
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 5);
10 require_once($yii);
11 $app = Yii::createWebApplication($config);
12 require_once($globals);
13 $app->run();
#12
+
 D:\localuser\hndcyg\web\index.php(4): require_once("D:\localuser\hndcyg\web\common.php")
1 <?php
2 $config=dirname(__FILE__).'/protected/config/main.php';
3 $globals = dirname(__FILE__) . '/protected/globals.php';
4 require_once('./common.php');
2019-04-24 22:22:11 Microsoft-IIS/8.5 Yii Framework/1.1.20