CDbException

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

/home/weplay1/public_html/yii3/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
+
 /home/weplay1/public_html/protected/controllers/UserController.php(1901): CActiveRecord->__construct()
1896     }
1897     
1898     
1899     public function actionRegister()
1900     {
1901         $model=new User;
1902         $model->scenario = 'register';   
1903         // Uncomment the following line if AJAX validation is needed
1904         // $this->performAjaxValidation($model);
1905 
1906         
#21
+
 /home/weplay1/public_html/index.php(10): CApplication->run()
05 $yii=dirname(__FILE__).'/./yii3/framework/yii.php';
06 $config=dirname(__FILE__).'/protected/config/main.php';
07 defined('YII_DEBUG') or define('YII_DEBUG',true);
08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
09 require_once($yii);
10 Yii::createWebApplication($config)->run();
11  /*
12 echo "<div style='text-align:center;width:100%;padding-top:100px'><img src='http://www.hjtcoin77.com/images/Maintenance.png' style='width:400px'/><br/><font style='color:#ff0022;font-size:20px;'>各位GPF家人们大家好
13   <br/>因77.com系统服务器升级,今晚24:00分到明天7:30分系统将关闭,不便之处尽请谅解!谢谢各位!!<br/><br/>汇集天达玛斯国际集团
14                          <br/>2019年9月1日 (new)</font></div>";
15 */                          
2024-03-29 01:03:22 Apache Yii Framework/1.1.25