CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to MySQL server on 'mysql377int.srv-hostalia.com' (115)

/home/sejas/bucletube.es/protected/views/site/pages/ultimos-videos.php(4)

01 <?php
02 include_once('Video.php');
03 
04 $connection=Yii::app()->db;
05 //$sql="SELECT distinct video_id FROM `milog` where length(video_id)=11 order by date desc  limit 20"; //limit
06 //$sql="SELECT distinct milog.video_id,titulo,descripcion FROM `milog` left join vista_videos_descripcion on milog.video_id=vista_videos_descripcion.video_id where length(milog.video_id)=11 order by date desc  limit 20"; //ultimos videos añadidos
07 $sql="SELECT distinct milog.video_id,titulo,descripcion FROM `milog` left join vista_videos_descripcion on milog.video_id=vista_videos_descripcion.video_id where length(milog.video_id)=11 order by date desc  limit 20"; //ultimos videos reproducidos
08 $command=$connection->createCommand($sql);
09 $rows=$command->queryAll();
10 
11 
12 
13 
14 echo '<ul class="videos">';
15 //para todo el arhcivo
16 foreach ($rows as $row) {

Stack Trace

#4
+
 /home/sejas/bucletube.es/protected/views/site/pages/ultimos-videos.php(4): CModule->__get("db")
1 <?php
2 include_once('Video.php');
3 
4 $connection=Yii::app()->db;
5 //$sql="SELECT distinct video_id FROM `milog` where length(video_id)=11 order by date desc  limit 20"; //limit
6 //$sql="SELECT distinct milog.video_id,titulo,descripcion FROM `milog` left join vista_videos_descripcion on milog.video_id=vista_videos_descripcion.video_id where length(milog.video_id)=11 order by date desc  limit 20"; //ultimos videos añadidos
7 $sql="SELECT distinct milog.video_id,titulo,descripcion FROM `milog` left join vista_videos_descripcion on milog.video_id=vista_videos_descripcion.video_id where length(milog.video_id)=11 order by date desc  limit 20"; //ultimos videos reproducidos
8 $command=$connection->createCommand($sql);
9 $rows=$command->queryAll();
#17
+
 /home/sejas/bucletube.es/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2021-07-24 20:45:52 LiteSpeed Yii Framework/1.1.8