title: PHP Warning: session_start(): Cannot send session cache limiter - headers already sentwhile the session_start is added at top
body: <p>I am using a PHP for my development. but at the time of login I am getting error as PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent</p>
  
  <p>This is my session file and added at top of the page.</p>
  
  <p>My code - 
  connection_config.php</p>
  
  <pre><code>&lt;?php
  session_start();
  //ob_start();
  //error_reporting(1);
  $server ='localhost';          
  $user ='**********';          
  $password ='*********';              
  $database = '**********';
  
  define ('DB_HOST', $server);
  define ('DB_USER', $user);
  define ('DB_PASSWORD', $password);
  define ('DB_NAME', $database);
  
  function get_connection()
  { 
      $connection=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
      // Check connection
      if (mysqli_connect_errno())
      {
          echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
      }else
      {
          return $connection; 
      }
  }
  ?&gt;
  </code></pre>
  
  <p>In mysql_function.php</p>
  
  <pre><code>&lt;?php
  require_once("connectin_config.php");
  </code></pre>
  
  <p>In function.php</p>
  
  <pre><code>&lt;?php
  require('mysql_functions.php');
  </code></pre>
  
  <p>In index.php</p>
  
  <pre><code>&lt;?php
  include('function/function.php');
  </code></pre>
  
  <p>login.php</p>
  
  <pre><code>&lt;?php
  include('function/function.php');
  $mess='';
  
  if(isset($_POST['submit'])){
  
  record_set('get_data','SELECT * FROM `admin` WHERE  `email`="'.$_POST['email'].'" and password="'.md5($_POST['password']).'"' );
      if($totalRows_get_data){
      $row_get_data= mysqli_fetch_assoc($get_data);
          $mess='login Successfully'; 
          $_SESSION['admin_id']=$row_get_data['id'];
          $_SESSION['admin_phone']=$row_get_data['phone'];
          $_SESSION['admin_fname']=$row_get_data['fname'];
          $_SESSION['admin_lname']=$row_get_data['lname'];
          $_SESSION['user_type']=$row_get_data['user_type'];
          $_SESSION['admin_image']=$row_get_data['image'];
          $_SESSION['admin_cdate']=$row_get_data['cdate'];
          reDirect('index.php'); 
      }else{
  
  
  
          $mess='Username or Password Invalid';
      }
  
  }
  ?&gt;
  </code></pre>