CDbException

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

/var/www/html/archive3/yii/framework/db/CDbConnection.php(399)

387                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
388             try
389             {
390                 Yii::trace('Opening DB connection','system.db.CDbConnection');
391                 $this->_pdo=$this->createPdoInstance();
392                 $this->initConnection($this->_pdo);
393                 $this->_active=true;
394             }
395             catch(PDOException $e)
396             {
397                 if(YII_DEBUG)
398                 {
399                     throw new CDbException('CDbConnection failed to open the DB connection: '.
400                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
401                 }
402                 else
403                 {
404                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
405                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
406                 }
407             }
408         }
409     }
410 
411     /**

Stack Trace

#7
+
 /var/www/html/archive3/site/protected/controllers/SiteController.php(359): CActiveRecord->findByPk(array("id" => "85077"))
354           $this->render('category', array('model' => $model, 'pages' => $pages, 'currentPage' => $currentPage, 'arr' => $arr, 'catid' => $catid));
355          */
356     }
357     public function actionArticle($id = 0, $name = '', $page = 1) {
358 
359         $this->article = Darticles::model()->findByPk(array('id' => $id));
360 
361 //        if(count($this->article) == 0 || $this->article['published'] == '0' || $this->article['trash'] == '1'){
362 //            $this->redirect('/');
363 //        }
364 
#17
+
 /var/www/html/archive3/site/index.php(33): CApplication->run()
28 {
29                 // releasing output buffer
30                 //return ob_end_flush();
31 };
32 */
33 $app->run();
34 
35 ?>
36 
37 
38 
2024-03-15 09:35:27 Apache/2.4.29 (Ubuntu) Yii Framework/1.1.17-dev