PHP warning

session_start(): Session cannot be started after headers have already been sent

/home3/searchdo/public_html/protected/views/profile/view.php(2)

01 <?php  
02 session_start(); 
03 $folder= $_SESSION[ 'uprofile'];   
04 $user = mysqli_fetch_assoc(mysqli_query($GLOBALS["mysqli_con"], "SELECT * FROM `reg_ngo` WHERE (`userfolder` = '".$folder."' AND `status` = 1) LIMIT 1"));
05 if (!empty($user['cname'])) { 
06 $this->pageTitle = $user['cname'] . ' ' . strtoupper($user['utype']) . ' in ' . $user['state'] . ', ' . $user['address'] . ', ' . $user['mobile'] . ', ' . $user['email'];
07 Yii::app()->clientScript->registerMetaTag($user['cname'] . ' ' . strtoupper($user['utype']) . ' in ' . $user['state'] . ', ' . $user['address'] . ', ' . $user['mobile'] . ', ' . $user['email'] . ' NGOs, Non Government Organization, Charity, Society, Not Profit Organization (NPO), Voluntary  Organization (VO), Charitable trust, Trust, foundation, social welfare organization', 'keywords');
08 Yii::app()->clientScript->registerMetaTag($user['cname'] . ' ' . strtoupper($user['utype']) . ' in ' . $user['state'] . '. Address and contact details: ' . $user['address'] . ', ' . $user['mobile'] . ', ' . $user['email'] . '. NGO are also explained as Non Government Organization, Charity, Society, Not Profit Organization (NPO), Voluntary  Organization (VO), Charitable trust, Trust, foundation, social welfare organization', 'description');
09 $page = empty($_GET['lst']) ? "index" : $_GET['lst']; 
10 ?> 
11  <style> .banner { background: url('https://www.searchdonation.com/images/clients-images/<?php echo $user['coverpage']; ?>') no-repeat 0px 0px; height: 350px; background-size: cover; position: relative; width:100%; } </style> 
12             <div class="row no-gutters">
13                 <div class="col-12">
14                     <p style="font-size:1px;color:white;"><?php echo $user['cname']; ?> NGO works for employeement generation and youth works for insurance of home, Insurance of cars, Insurance of bike, Lawyer, property lawyer, Mortage, Attorney, accepts donation, donate cars, donate clothes, conference call, Education degree, Credit Cards, Electricity, SEO etc.</p> 

Stack Trace

#0
+
 /home3/searchdo/public_html/protected/views/profile/view.php(2): session_start()
1 <?php  
2 session_start(); 
3 $folder= $_SESSION[ 'uprofile'];   
4 $user = mysqli_fetch_assoc(mysqli_query($GLOBALS["mysqli_con"], "SELECT * FROM `reg_ngo` WHERE (`userfolder` = '".$folder."' AND `status` = 1) LIMIT 1"));
5 if (!empty($user['cname'])) { 
6 $this->pageTitle = $user['cname'] . ' ' . strtoupper($user['utype']) . ' in ' . $user['state'] . ', ' . $user['address'] . ', ' . $user['mobile'] . ', ' . $user['email'];
7 Yii::app()->clientScript->registerMetaTag($user['cname'] . ' ' . strtoupper($user['utype']) . ' in ' . $user['state'] . ', ' . $user['address'] . ', ' . $user['mobile'] . ', ' . $user['email'] . ' NGOs, Non Government Organization, Charity, Society, Not Profit Organization (NPO), Voluntary  Organization (VO), Charitable trust, Trust, foundation, social welfare organization', 'keywords');
#5
+
 /home3/searchdo/public_html/protected/controllers/ProfileController.php(2): CController->render("view")
1 <?php class ProfileController extends Controller { public $layout='//layouts/column2'; public function actions() { return array( 'captcha' => array( 'class' => 'CCaptchaAction', 'backColor' => 0xFFFFFF, ), 'page' => array( 'class' => 'CViewAction', ), ); } public function actionIndex() { $this->render('index'); }
2 public function actionView() { $this->render('view'); } }
#13
+
 /home3/searchdo/public_html/index.php(11): CApplication->run()
06 $yii = dirname(__FILE__) . '/beta_thora_bachke_rahna/kya_hal_hai_beta/framework/yii.php';
07         $config = dirname(__FILE__) . '/protected/config/main.php';
08         defined('YII_DEBUG') or define('YII_DEBUG', TRUE);
09         defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 0);
10         require_once($yii);
11         Yii::createWebApplication($config)->run(); 
12         ?>
2025-05-01 18:07:18 Apache Yii Framework/1.1.10