CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1049] Unknown database 'ls_master'

/mnt/data/shnoulle/nginx/www/master/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

#8
+
 /mnt/data/shnoulle/nginx/www/master/application/models/LSActiveRecord.php(34): CActiveRecord->hasAttribute("created")
29      * @return array
30      */
31     public function behaviors()
32     {
33         $aBehaviors = array();
34         $sCreateFieldName = ($this->hasAttribute('created') ? 'created' : null);
35         $sUpdateFieldName = ($this->hasAttribute('modified') ? 'modified' : null);
36         $sDriverName = Yii::app()->db->getDriverName();
37         if ($sDriverName == 'sqlsrv' || $sDriverName == 'dblib') {
38             $sTimestampExpression = new CDbExpression('GETDATE()');
39         } else {
#10
+
 /mnt/data/shnoulle/nginx/www/master/application/models/SettingGlobal.php(33): CActiveRecord::model("SettingGlobal")
28      * @inheritdoc
29      * @return CActiveRecord
30      */
31     public static function model($class = __CLASS__)
32     {
33         return parent::model($class);
34     }
35 
36     /** @inheritdoc */
37     public function tableName()
38     {
#11
+
 /mnt/data/shnoulle/nginx/www/master/application/helpers/globalsettings_helper.php(23): SettingGlobal::model()
18 injectglobalsettings();
19 
20 
21 function injectglobalsettings()
22 {
23     $settings = SettingGlobal::model()->findAll();
24 
25     //if ($dbvaluearray!==false)
26     if (count($settings) > 0) {
27         foreach ($settings as $setting) {
28             Yii::app()->setConfig($setting->getAttribute('stg_name'), $setting->getAttribute('stg_value'));
2019-05-09 13:59:52 nginx/1.14.2 Yii Framework/1.1.21