CDbException

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

/home/i/iskconmos/veda.ru/public_html/framework/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

#7
+
 /home/i/iskconmos/veda.ru/public_html/protected/modules/blog/models/Blog.php(48): CActiveRecord::model("Blog")
43      * Returns the static model of the specified AR class.
44      *
45      * @return Blog the static model class
46      */
47     public static function model($className = __CLASS__) {
48         return parent::model($className);
49     }
50 
51     /**
52      * @return string the associated database table name
53      */
#8
+
 /home/i/iskconmos/veda.ru/public_html/protected/modules/blog/controllers/BlogController.php(47): Blog::model()
42     }
43 
44     // Отобразить карточку блога
45     public function actionShow($slug)
46     {
47         $blog = Blog::model()->by_link()->find('slug = :slug', array(':slug' => $slug));
48 
49         if (!$blog)
50             throw new CHttpException(404, Yii::t('blog', 'Пост "{blog}" не найден!', array('{blog}' => $slug)));
51         
52         $this->cblog = $blog->category_id;
#18
+
 /home/i/iskconmos/veda.ru/public_html/index.php(15): CApplication->run()
10 // при работе сайта в "боевом" режиме следующие две строки рекомендуется закомментировать
11 defined('YII_DEBUG') or define('YII_DEBUG', true);
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();    
2024-03-29 03:09:01 Apache/2.4.29 Yii Framework/1.1.12