CDbException

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

/home/nhadatha/public_html/protected/models/forms/SettingForm.php(216)

204                             foreach (self::$smtpFields as $k => $v) {
205                                 if ($v == $item)
206                                     Yii::app()->mail->transportOptions[$k] = Yii::app()->setting->getItem($item);
207                             }
208                         }
209                     }
210                 }
211                 else {
212                     Yii::app()->mail->transportOptions = '';
213                 }
214 
215                 // none SMTP fields
216                 if (!in_array($item, self::$smtpFields) && Yii::app()->setting->getItem($item)) {
217                     Yii::app()->params[$item] = Yii::app()->setting->getItem($item);
218                 }
219             }
220         }
221     }
222 
223     /*
224      * Austin added date 6/7/2014
225      * get all attributes from setting array
226      */
227 
228     public static function getAllAttributes() {

Stack Trace

#4
+
 /home/nhadatha/public_html/protected/extensions/MyConfig/MyConfig.php(207): CApplication->getDb()
202         if($this->getUseCache())
203             $items=Yii::app()->cache->get($this->getCacheId());
204 
205         if(!$items)
206         {
207             $connection=Yii::app()->getDb();
208             $command=$connection->createCommand('SELECT * FROM '.$this->getTableName().' WHERE 1');
209             $result=$command->queryAll();
210             
211             if(empty($result))
212                 return false;
#5
+
 /home/nhadatha/public_html/protected/extensions/MyConfig/MyConfig.php(41): MyConfig->loadDbItems()
36      * @return
37      */
38     public function init()
39     {
40         if($this->getLoadDbItems())
41             $this->loadDbItems();
42         
43         if($this->getCreateTable())
44             $this->createTable();
45 
46         $this->_initialized=true;
#8
+
 /home/nhadatha/public_html/protected/models/forms/SettingForm.php(216): CModule->__get("setting")
211                 else {
212                     Yii::app()->mail->transportOptions = '';
213                 }
214 
215                 // none SMTP fields
216                 if (!in_array($item, self::$smtpFields) && Yii::app()->setting->getItem($item)) {
217                     Yii::app()->params[$item] = Yii::app()->setting->getItem($item);
218                 }
219             }
220         }
221     }
2024-03-29 18:11:09 LiteSpeed Yii Framework/1.1.15