CDbException

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

/homepages/30/d938873205/htdocs/www.huntingtrades.com/yii/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

#4
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/protected/modules/bbii/models/BbiiAR.php(14): CApplication->getDb()
09             }
10         } else {
11             if(self::$db!==null) {
12                 return self::$db;
13             }
14             self::$db = Yii::app()->getDb();
15         }
16         if(self::$db instanceof CDbConnection) {
17             return self::$db;
18         } else {
19             throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.'));
#7
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/protected/modules/bbii/BbiiModule.php(125): CActiveRecord->findByAttributes()
120                     $model->save();
121                 }
122             }
123             // register visit by webspider
124             if(isset($_SERVER['HTTP_USER_AGENT'])) {
125                 $spider = BbiiSpider::model()->findByAttributes(array('user_agent'=>$_SERVER['HTTP_USER_AGENT']));
126             } else {
127                 $spider = null;
128             }
129             if($spider !== null) {
130                 $spider->setScenario('visit');
#12
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',true);
12 // specify how many levels of call stack should be shown in each log message
13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14 
15 require_once($yii);
16 Yii::createWebApplication($config)->run();
2024-03-19 06:06:24 Apache Yii Framework/1.1.14