CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

/var/www/u0997245/data/PORTAL-SRO.RU/map/newreestr/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

#9
+
 /var/www/u0997245/data/PORTAL-SRO.RU/map/newreestr/protected/controllers/SiteController.php(30): CActiveRecord->__construct("search")
25      * This is the default 'index' action that is invoked
26      * when an action is not explicitly requested by users.
27      */
28     public function actionIndex()
29     {
30         $model=new Members('search');
31         $model->unsetAttributes();  // clear any default values
32         if(isset($_GET['Members']))
33             $model->attributes=$_GET['Members'];
34         if(isset($_POST['Members']))
35             $model->attributes=$_POST['Members'];
#17
+
 /var/www/u0997245/data/PORTAL-SRO.RU/map/newreestr/index.php(17): CApplication->run()
12 defined('YII_DEBUG') or define('YII_DEBUG',true);
13 // specify how many levels of call stack should be shown in each log message
14 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
18 
2020-07-02 12:39:19 Apache/2.2.15 (CentOS) Yii Framework/1.1.13