CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused

/home/dpmptspwonogiri/public_html/protected/models/Tblizin.php(106)

094         $criteria->compare('tblizin_adaretribusi',$this->tblizin_adaretribusi,true);
095 
096         return new CActiveDataProvider($this, array(
097             'criteria'=>$criteria,
098         ));
099     }
100 
101     /**
102      * @return CDbConnection the database connection used for this class
103      */
104     public function getDbConnection()
105     {
106         return Yii::app()->db2;
107     }
108 
109     /**
110      * Returns the static model of the specified AR class.
111      * Please note that you should have this exact method in all your CActiveRecord descendants!
112      * @param string $className active record class name.
113      * @return Tblizin the static model class
114      */
115     public static function model($className=__CLASS__)
116     {
117         return parent::model($className);
118     }

Stack Trace

#4
+
 /home/dpmptspwonogiri/public_html/protected/models/Tblizin.php(106): CModule->__get("db2")
101     /**
102      * @return CDbConnection the database connection used for this class
103      */
104     public function getDbConnection()
105     {
106         return Yii::app()->db2;
107     }
108 
109     /**
110      * Returns the static model of the specified AR class.
111      * Please note that you should have this exact method in all your CActiveRecord descendants!
#7
+
 /home/dpmptspwonogiri/public_html/themes/frontend/views/layouts/modul/modul_infoizin.php(18): CActiveRecord->findAll("tblizin_isaktif=:isaktif", array(":isaktif" => "T"))
13               Jenis Izin
14             </div>
15             <div class="col-md-10">
16               <select id="jenis_izin" name="jenis_izin" class="form-control" onchange="getpermohonan()">
17                 <option value="*">--Pilih Jenis Izin-- </option>
18                 <?php $model = Tblizin::model()->findAll('tblizin_isaktif=:isaktif', array(':isaktif'=>'T'));?>
19                 <?php foreach ($model as $list_izin): ?>
20                   <option value="<?php echo $list_izin['tblizin_id']; ?>"><?php echo $list_izin['tblizin_nama']; ?></option>
21                 <?php endforeach ?>
22               </select>
23             </div>
#8
+
 /home/dpmptspwonogiri/public_html/themes/frontend/views/layouts/main.php(91): require("/home/dpmptspwonogiri/public_html/themes/frontend/views/layouts/...")
86 
87                                 <div class="col-md-6">
88                                     <?php if ($this->action->id=='kontent'): ?>
89                                         <?php echo $content; ?>
90                                     <?php elseif ($this->action->id=='page'): ?>
91                                         <?php @require 'modul/'.$this->namamodul; ?>
92                                     <?php else: ?>
93                                         <?php echo $content; ?>
94                                     <?php endif ?>
95                                 </div>
96 
2018-10-24 10:37:35 Apache Yii Framework/1.1.15