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/protected/components/Controller.php(27)

15      */
16     public $menu=array();
17     /**
18      * @var array the breadcrumbs of the current page. The value of this property will
19      * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
20      * for more details on how to specify this property.
21      */
22     public $breadcrumbs=array();
23         protected function beforeAction($action)
24   {
25 
26               
27                 $settings = Yii::app()->settings;
28  
29                 $model = new SettingsForm();
30                 foreach($model->attributes as $category => $values){
31                     $cat = $model->$category;
32                     foreach($values as $key=>$val){
33                         $c=$settings->get($category, $key);
34                         if($key=='root_users'){
35                          $c=explode(',', $c);   
36                         }
37                         Yii::app()->params[$key] = $c;
38                     }
39                 }

Stack Trace

#3
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/protected/components/CmsSettings.php(408): CModule->getComponent()
403     /**
404      * @return CDbConnection the db connection component
405      */
406     protected function getDbComponent()
407     {
408         return Yii::app()->getComponent($this->getDbComponentId());
409     }
410 
411     protected function addDbItem($category='system', $key, $value)
412     {
413         $connection=$this->getDbComponent();
#4
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/protected/components/CmsSettings.php(510): CmsSettings->getDbComponent()
505     /**
506      * create the settings table
507      */
508     protected function createTable()
509     {
510         $connection=$this->getDbComponent();
511         $tableName=$connection->tablePrefix.str_replace(array('{{','}}'), '', $this->getTableName());
512         $sql='CREATE TABLE IF NOT EXISTS `'.$tableName.'` (
513           `id` int(11) NOT NULL auto_increment,
514           `category` varchar(64) NOT NULL default \'system\',
515           `key` varchar(255) NOT NULL,
#5
+
 /homepages/30/d938873205/htdocs/www.huntingtrades.com/protected/components/CmsSettings.php(43): CmsSettings->createTable()
38     {
39         parent::init();
40         Yii::app()->attachEventHandler('onEndRequest', array($this, 'whenRequestEnds'));
41         
42         if($this->getCreateTable())
43             $this->createTable();
44     }
45 
46 
47     /**
48      * CmsSettings::set()
2024-03-19 02:55:54 Apache Yii Framework/1.1.14