CDbException

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

/nfs/nfs2/home/cvision/cgi-pub/iclass/framework/db/CDbConnection.php(382)

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

Stack Trace

#8
+
 /nfs/nfs2/home/cvision/cgi-pub/iclass/protected/controllers/SiteController.php(35): CActiveRecord->__construct()
30         // display register page for unauthenticated user
31         // YII guest user is unauthenticated user, but guest user in our system is user whose
32         //  indentity is not verified by admin
33         if (Yii::app()->user->isGuest) 
34         {
35             $model = new User('register');
36             
37             if(isset($_POST['User']))
38             {
39                 $model->attributes=$_POST['User'];
40                 $model->role = 'guest';
#16
+
 /nfs/nfs2/home/cvision/cgi-pub/iclass/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
15 
2024-03-29 02:14:07 Apache/2.4.41 (Ubuntu) Yii Framework/1.1.14