, - . , . , . ( ) , . , , , , .
 

, !
 

? , !
 

. , .
 

! !


[an error occurred while processing this directive] [an error occurred while processing this directive]

[an error occurred while processing this directive]

/

CDbException

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused

/home/admin6/web/strelomet.ru/public_html/info/protected/helpers/global.php(111)

099 function substr_unicode($str, $s, $l = null) {
100     return join("", array_slice(
101         preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY), $s, $l));
102 }
103 
104 
105 /**
106  * Returns the setting value
107  * This is the shortcut to Yii::app()->settings->get($category, $param);
108  */
109 function setting($category, $param) 
110 {
111     return Yii::app()->settings->get($category, $param);;
112 }
113 
114 /**
115  * Return true if shop with $shop_id is approved to user
116  */
117 function isUserShop($shop_id) 
118 {
119     if ( Yii::app()->user->isGuest )
120         return false;
121         
122     $user_profile = Yii::app()->getModule('user')->user()->profile();
123     if( $user_profile->shop_id == $shop_id && $user_profile->shop_approved == 1 )

Stack Trace

#3
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/components/CmsSettings.php(408): CModule->getComponent("db")
403     /**
404      * @return CDbConnection the db connection component
405      */
406     protected function getDbComponent()
407     {
408         return Yii::app()->getComponent($this->getDbComponentId());
409     }
410 
411     protected function addDbItem($category='system', $key, $value)
412     {
413         $connection=$this->getDbComponent();
#4
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/components/CmsSettings.php(510): CmsSettings->getDbComponent()
505     /**
506      * create the settings table
507      */
508     protected function createTable()
509     {
510         $connection=$this->getDbComponent();
511         $tableName=$connection->tablePrefix.str_replace(array('{{','}}'), '', $this->getTableName());
512         $sql='CREATE TABLE IF NOT EXISTS `'.$tableName.'` (
513           `id` int(11) NOT NULL auto_increment,
514           `category` varchar(64) NOT NULL default \'system\',
515           `key` varchar(255) NOT NULL,
#5
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/components/CmsSettings.php(43): CmsSettings->createTable()
38     {
39         parent::init();
40         Yii::app()->attachEventHandler('onEndRequest', array($this, 'whenRequestEnds'));
41         
42         if($this->getCreateTable())
43             $this->createTable();
44     }
45 
46 
47     /**
48      * CmsSettings::set()
2026-09-01 07:20:25 Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.13 Yii Framework/1.1.13

CDbException

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused

/home/admin6/web/strelomet.ru/public_html/info/yii/framework/db/CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/models/Shop.php(67): CActiveRecord::model("Shop")
62      * @param string $className active record class name.
63      * @return Shop the static model class
64      */
65     public static function model($className=__CLASS__)
66     {
67         return parent::model($className);
68     }
69 
70     /**
71      * @return string the associated database table name
72      */
#8
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/views/site/blocks/shop-3best.php(23): Shop::model()
18         $criteria->compare('t.city_id',$_GET['city_id']);
19     }
20     $criteria->compare('t.status',1);
21     $criteria->limit = 3;
22     $criteria->order = 't.wrate DESC, t.nrate DESC, t.create_time';
23     $shops = Shop::model()->cache('180')->findAll($criteria);
24 
25     $object_name  = CHtml::encode( isset($_GET['object_name']) ? iconv('cp1251','utf-8',$_GET['object_name']) : 'фирмы' );    
26         
27         
28 ?>
#13
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/components/Controller.php(53): CController->render("//site/blocks/shop-3best", null, false)
48         $customViewPath = $module->getBasePath().DIRECTORY_SEPARATOR.'views_custom'.DIRECTORY_SEPARATOR.$this->getId();
49 
50         if ( $this->resolveViewFile($view,$customViewPath,Yii::app()->getViewPath()) )
51             $this->_customViewPath = true;
52             
53         parent::render($view,$data,$return);
54     }
55 }
2026-09-01 07:20:26 Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.13 Yii Framework/1.1.13


( 27 , ) ( 27 110 ) ( - 110 , )

, , - -, , , . , , , , . , 5 100 .

(), , . , 30-40 100 . , ?

, . , .

, . - ? - . - , . , .

? . , . , . . . .

, . , , , .

CDbException

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused

/home/admin6/web/strelomet.ru/public_html/info/yii/framework/db/CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/models/News.php(48): CActiveRecord::model("News")
43      * @param string $className active record class name.
44      * @return News the static model class
45      */
46     public static function model($className=__CLASS__)
47     {
48         return parent::model($className);
49     }
50 
51     /**
52      * @return string the associated database table name
53      */
#8
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/views/site/blocks/news-last-news.php(22): News::model()
17     $criteria->with = array('catImages','newsCommentsCount','newsCommentsPlusCount','newsCommentsMinusCount','newsCommentsZeroCount');
18     $criteria->limit = $count;
19     $criteria->order = 't.create_time DESC';
20 
21     //Используем простой кеш для блока - обновляем кеш раз в 3 минуты        
22     $dataProvider=new CActiveDataProvider(News::model()->cache('180'), array(
23             'criteria'=>$criteria,
24             'pagination'=>false,
25             ));    
26 ?>
27 <div class="news-last-news yii-block">
#13
+
 /home/admin6/web/strelomet.ru/public_html/info/protected/components/Controller.php(53): CController->render("//site/blocks/news-last-news", null, false)
48         $customViewPath = $module->getBasePath().DIRECTORY_SEPARATOR.'views_custom'.DIRECTORY_SEPARATOR.$this->getId();
49 
50         if ( $this->resolveViewFile($view,$customViewPath,Yii::app()->getViewPath()) )
51             $this->_customViewPath = true;
52             
53         parent::render($view,$data,$return);
54     }
55 }
2026-09-01 07:20:26 Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.13 Yii Framework/1.1.13




Copyright Strelomet.RU
2008 -  

, www.strelomet.ru
(<a href=www.strelomet.ru target=_blank> </a>) !