CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'rds4g2a79t7nsym5d9x5private.mysql.rds.aliyuncs.com' (4)

/home/webdata/htdocs/donghai/www/protected/controllers/DefaultController.php(20)

08 class defaultController extends Controller
09 {
10 
11 
12    public $layout='//layouts/column4';       
13         
14     public function actionIndex()
15     {
16                
17 
18         $imageFile_path = "indexImages/bbs/".date('Ym')."/".date('d');
19         @IndexBbsImg::mkimagedir($imageFile_path);
20         $house_db = Yii::app()->db;
21         $bbs_db = Yii::app()->bbs;
22         $news_db = Yii::app()->news;
23                 
24                 #    头条
25             $FirtLateNews = News::model()->GetPositionNews(16,'',1);
26                 #    头条辅助
27             $FirstHelp =  News::model()->GetPositionNews(17,'',3);
28                 #    最新活动
29             $ZxhDlatest = News::model()->ReturnNewsArr($news_db,"SELECT id,title,keywords,act_time,act_place FROM {{tg_product}} WHERE `show`=1 AND ".time()." <= end_time AND FIND_IN_SET(typeid,'".Yii::app()->params['product_typeid']."') ORDER BY listorder ASC,id DESC LIMIT 3");
30                 #   楼盘动态
31             $Lpdtlatest = News::model()->GetJiaQi(22,3,'index');
32                 #   高端访谈

Stack Trace

#4
+
 /home/webdata/htdocs/donghai/www/protected/controllers/DefaultController.php(20): CModule->__get("db")
15     {
16                
17 
18         $imageFile_path = "indexImages/bbs/".date('Ym')."/".date('d');
19         @IndexBbsImg::mkimagedir($imageFile_path);
20         $house_db = Yii::app()->db;
21         $bbs_db = Yii::app()->bbs;
22         $news_db = Yii::app()->news;
23                 
24                 #    头条
25             $FirtLateNews = News::model()->GetPositionNews(16,'',1);
#12
+
 /home/webdata/htdocs/donghai/www/index.php(58): CApplication->run()
53 defined('YII_DEBUG') or define('YII_DEBUG',true);
54 // specify how many levels of call stack should be shown in each log message
55 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
56 require_once($yii);
57 
58 Yii::createWebApplication($config)->run();
59 
60 
2018-10-12 22:16:46 SunToo.Ltd/0.180 Yii Framework/1.1.13