CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1203] User dainikek already has more than 'max_user_connections' active connections

/home/dainikek/public_html/epaper/protected/components/Settings.php(35)

23         return $instance;
24     }
25     
26     protected function __construct() { }
27 
28     private $_settings;
29     
30     /**
31      * Initiates the settings
32      * @return array
33      */
34     public function init(){
35         $cmd = Yii::app()->db->createCommand();
36         $result = $cmd->select("*")->from("settings")->queryAll();        
37         if (count($result) > 0) {
38             foreach ($result as $r) {
39                 $this->_settings[$r["opt_class"]][$r["opt_key"]] = $r["opt_value"];
40             }
41         }
42         return $this->_settings;
43     }
44     
45     /**
46      * Returns the value of setting key. Returns false if not found
47      * @param string $key

Stack Trace

#4
+
 /home/dainikek/public_html/epaper/protected/components/Settings.php(35): CModule->__get("db")
30     /**
31      * Initiates the settings
32      * @return array
33      */
34     public function init(){
35         $cmd = Yii::app()->db->createCommand();
36         $result = $cmd->select("*")->from("settings")->queryAll();        
37         if (count($result) > 0) {
38             foreach ($result as $r) {
39                 $this->_settings[$r["opt_class"]][$r["opt_key"]] = $r["opt_value"];
40             }
#5
+
 /home/dainikek/public_html/epaper/protected/components/Settings.php(21): Settings->init()
16      */
17     public static function i(){
18         static $instance = null;
19         if (null === $instance) {            
20             $instance = new static();            
21             $instance->init();
22         }
23         return $instance;
24     }
25     
26     protected function __construct() { }
#6
+
 /home/dainikek/public_html/epaper/protected/components/abstracts/AbstractAdminSettingsForm.php(173): Settings::i()
168      */
169     public static function i(){
170         static $instance = null;
171         if (null === $instance) {            
172             $instance = new static();
173             $data = Settings::i()->getByClass(get_called_class());
174             if (!is_null($data)) {
175                 $instance->attributes = $data;
176             }
177         }        
178         return $instance;
2024-03-28 10:38:11 Apache Yii Framework/1.1.19