PHP warning

Cannot modify header information - headers already sent by (output started at /home/chaowarit/domains/teedindd.com/public_html/realia/ad_AdController.php:1)

/home/chaowarit/domains/teedindd.com/public_html/realia/ad_AdController.php(38)

26     {
27         return array(
28             'captcha'=>array(
29                 'class'=>'CCaptchaAction',
30                 'backColor'=>0xFFFFFF,
31                 'testLimit' => 1
32             ),
33         );
34     }
35     
36     public function actionIndex()
37     {    
38         header('Location: http://www.teedindd.com/th/error/Error404.php');
39         exit;        
40         /*
41         if($_GET['email']<> '')
42             header("Location: http://www.teedindd.com");
43 
44         if($_GET['cid'] <> '' && $_GET['lid'] == '' && $_GET['tid'] == '' && $_GET['price'] == '' && $_GET['show_with_pic'] == '' && $_GET['page_size'] == '' && $_GET['page_order'] == '' && $_GET['search_string'] == '' && $_GET['llid'] == ''  && $_GET['ccid'] == '' && $_GET['ggid'] == '' ) {
45             unset(Yii::app()->session['lid']);
46         } 
47 
48         if($_GET['lid'] <> '' ) 
49             Yii::app()->session['lid'] = $_GET['lid'];
50                 

Stack Trace

#0
+
 /home/chaowarit/domains/teedindd.com/public_html/realia/ad_AdController.php(38): header("Location: http://www.teedindd.com/th/error/Error404.php")
33         );
34     }
35     
36     public function actionIndex()
37     {    
38         header('Location: http://www.teedindd.com/th/error/Error404.php');
39         exit;        
40         /*
41         if($_GET['email']<> '')
42             header("Location: http://www.teedindd.com");
43 
#8
+
 /home/chaowarit/domains/teedindd.com/public_html/index.php(51): CApplication->run()
46 
47 //define('YII_ENABLE_ERROR_HANDLER', true);
48 //define('YII_ENABLE_EXCEPTION_HANDLER', true);
49 
50 require_once($yii);
51 Yii::createWebApplication($config)->run();
2017-01-22 23:12:45 Apache 2.0.59 Secured Yii Framework/1.1.9