CDbException

CDbConnection failed to open the DB connection: SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?

/var/www/public_html/common/models/ProductCategory.php(64)

52      * @return string the associated database table name
53      */
54     public function tableName()
55     {
56         return 'product_category';
57     }
58 
59     /**
60      * @return CDBConnection the associated database connection
61      */
62     public function getDbConnection()
63     {
64         return Yii::app()->dbp;
65     }
66 
67     /**
68      * @return array validation rules for model attributes.
69      */
70     public function rules()
71     {
72         return array(
73             array('name, title', 'required'),
74             array(
75                 'pid, sort_order, active, published, created_by, updated_by, downloads',
76                 'style',

Stack Trace

#4
+
 /var/www/public_html/common/models/ProductCategory.php(64): CModule->__get()
59     /**
60      * @return CDBConnection the associated database connection
61      */
62     public function getDbConnection()
63     {
64         return Yii::app()->dbp;
65     }
66 
67     /**
68      * @return array validation rules for model attributes.
69      */
#8
+
 /var/www/public_html/frontend/controllers/SiteController.php(1861): CActiveRecord->__call()
1856      */
1857     public function actionCategory($slug)
1858     {
1859         $this->layout = '//layouts/page';
1860 
1861         $category = ProductCategory::model()->active()->ofSlug($slug)->find();
1862 
1863         if (is_null($category)) {
1864             throw new CHttpException(400, 'Invalid request. Selected category does not exist.');
1865         }
1866 
#16
+
 /var/www/public_html/common/components/WebApplication.php(33): CWebApplication->runController()
28      * that Apache polls its processes to see if they're alive. This function causes
29      * Yii to respond without logging errors.
30      */
31     public function runController($route) {
32         try {
33             parent::runController($route);
34         } catch (CHttpException $e) {
35             if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS' && @$_SERVER['REQUEST_URI'] == '*') {
36                 Yii::app()->end('Hello, friend!');
37             } else
38                 throw $e;
2024-03-19 11:51:35 nginx/1.22.0 Yii Framework/1.1.21