CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory

/home/dpmptsp/public_html/mpp.kuduskab.go.id/protected/models/Reflayanan.php(117)

105         $criteria->compare('reflayanan_isaktif',$this->reflayanan_isaktif,true);
106 
107         return new CActiveDataProvider($this, array(
108             'criteria'=>$criteria,
109         ));
110     }
111 
112     /**
113      * @return CDbConnection the database connection used for this class
114      */
115     public function getDbConnection()
116     {
117         return Yii::app()->db2;
118     }
119 
120     /**
121      * Returns the static model of the specified AR class.
122      * Please note that you should have this exact method in all your CActiveRecord descendants!
123      * @param string $className active record class name.
124      * @return Reflayanan the static model class
125      */
126     public static function model($className=__CLASS__)
127     {
128         return parent::model($className);
129     }

Stack Trace

#4
+
 /home/dpmptsp/public_html/mpp.kuduskab.go.id/protected/models/Reflayanan.php(117): CModule->__get("db2")
112     /**
113      * @return CDbConnection the database connection used for this class
114      */
115     public function getDbConnection()
116     {
117         return Yii::app()->db2;
118     }
119 
120     /**
121      * Returns the static model of the specified AR class.
122      * Please note that you should have this exact method in all your CActiveRecord descendants!
#7
+
 /home/dpmptsp/public_html/mpp.kuduskab.go.id/protected/controllers/WebController.php(162): CActiveRecord->findByPk("206")
157     }
158 
159     public function actionDetail_layanan()
160     {
161         $id = Yii::app()->request->getParam('id');
162         $data['layanan'] = Reflayanan::model()->findByPk($id);
163 
164         $data['persyaratan'] = Yii::app()->db2->createCommand('SELECT *
165             FROM
166             tblpersyaratan
167             INNER JOIN refsyarat ON (tblpersyaratan.refsyarat_id = refsyarat.refsyarat_id)
#15
+
 /home/dpmptsp/public_html/mpp.kuduskab.go.id/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-05-08 14:33:44 LiteSpeed Yii Framework/1.1.15