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/Product.php(60)

48      * @return string the associated database table name
49      */
50     public function tableName()
51     {
52         return 'product';
53     }
54 
55     /**
56      * @return CDBConnection the associated database connection
57      */
58     public function getDbConnection()
59     {
60         return Yii::app()->dbp;
61     }
62 
63     /**
64      * @return array validation rules for model attributes.
65      */
66     public function rules()
67     {
68         return array(
69             array('name', 'required'),
70             array(
71                 'active, displayed, idimplex, compressor_count, order, created_by, updated_by',
72                 'numerical',

Stack Trace

#4
+
 /var/www/public_html/common/models/Product.php(60): CModule->__get()
55     /**
56      * @return CDBConnection the associated database connection
57      */
58     public function getDbConnection()
59     {
60         return Yii::app()->dbp;
61     }
62 
63     /**
64      * @return array validation rules for model attributes.
65      */
#8
+
 /var/www/public_html/frontend/controllers/SiteController.php(1880): CActiveRecord->__call()
1875     public function actionProduct($slug)
1876     {
1877         $this->layout = '//layouts/page';
1878 
1879         /** @var $model Product */
1880         $model = Product::model()->active()->web()->ofSlug($slug)->find();
1881 
1882         $recursive = function ($id, $a) use (&$recursive) {
1883             $crt = new CDbCriteria();
1884             $crt->select = ['id'];
1885             $crt->compare('pid', $id);
#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 09:47:57 nginx/1.22.0 Yii Framework/1.1.21