CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection timed out

/home/chedvorik/chedvorik.nichost.ru/docs/framework/db/CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 /home/chedvorik/chedvorik.nichost.ru/docs/protected/modules/admin/models/SiteSettings.php(20): CActiveRecord::model("SiteSettings")
15      * @param string $className active record class name.
16      * @return SiteSettings the static model class
17      */
18     public static function model($className=__CLASS__)
19     {
20         return parent::model($className);
21     }
22 
23     /**
24      * @return string the associated database table name
25      */
#8
+
 /home/chedvorik/chedvorik.nichost.ru/docs/protected/components/Controller.php(235): SiteSettings::model()
230         echo $return;
231     }
232     
233     public function makeSiteSettings()
234     {
235          $ss = SiteSettings::model()->findAll();
236          
237          if ($ss != '')
238          {
239              foreach ($ss as $k=>$v)
240              {
#9
+
 /home/chedvorik/chedvorik.nichost.ru/docs/protected/components/Controller.php(74): Controller->makeSiteSettings()
69         
70         include('redirects.php');
71 
72         $this->navi = array(0=>array('url' => '/',  'name' => 'Главная'));
73         
74         $this->makeSiteSettings();
75         
76         $this->makeAllSections();
77         
78         $this->getSeo();
79         
2019-08-21 23:35:56 Apache/2.4.27 (Ubuntu) PHP/5.6.31 Yii Framework/1.1.13