title: Error with session ini setting modification
body: <p>A PHP Error was encountered</p>
  
  <pre><code>Severity: Warning
  Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time
  Filename: Session/Session.php
  Line Number: 316
  Backtrace:
  File: C:\xampp\htdocs\testing\index.php
  Line: 315
  Function: require_once
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
   session_start(); //we need to start session in order to access it through CI
  class Adminlogin extends CI_Controller {
  
   public function _construct(){
   parent::_construct();
  
   //Load form helper library
   $this-&gt;load-&gt;helper('form');
   //Load form validation library
   $this-&gt;load-&gt;library('form_validation');
   //Load session library
   $this-&gt;load-&gt;library('session');
   //Load database
   $this-&gt;load-&gt;model('login_database');
   }
  
   //show login page
   public function index()
   {
    $this-&gt;load-&gt;view('admin_login');
   }
   //show registration page
   public function user_registration_show(){
    $this-&gt;load-&gt;view('admin_signup');
   }
   //Validate and store registration data in database
   public function new_user_registration(){
  
   //Check Validation for user input in SignUp form
    $this-&gt;form_validation-&gt;set_rules('admin_username', 'Username','trim|required|xss_clean');
    $this-&gt;form_validation-&gt;set_rules('admin_password', 'Password','trim|required|xss_clean');
   if($this-&gt;form_validation-&gt;run()== FALSE){
    $this-&gt;load-&gt;view('admin_signup');}
   else{
    $data = array(
     'admin_username' =&gt; $this-&gt;input-&gt;post('username'),
     'admin_password' =&gt; $this-&gt;input-&gt;post('password'));
   $result = $this-&gt;login_database-&gt;registration_insert($data);
   if($result == TRUE){
    $data['message_display'] = 'Registration Successfully !';
   $this-&gt;load-&gt;view('admin_login', $data);
   }else{
    $data['message_display'] = 'Username already exist';
   $this-&gt;load-&gt;view('admin_signup',$data);
   }
   }
   }
  
   //Check for user login process
   public function user_login_process(){
   $this-&gt;form_validation-&gt;set_rules('admin_username','Username', 'trim|required|xss_clean');
   $this-&gt;form_validation-&gt;set_rules('admin_password','Password', 'trim|required|xss_clean');
   if($this-&gt;form_validation-&gt;run() == FALSE){
   if(isset($this-&gt;session-&gt;userdata['loggen_in'])){
      $this-&gt;load-&gt;view('Admin/admin_dashboard');
   }else{
    $this-&gt;load-&gt;view('admin_login');
   }
   }else{
    $data = array(
     'admin_username' =&gt; $this-&gt;input-&gt;post('username'),
     'admin_password' =&gt; $this-&gt;input-&gt;post('password'));
   $result = $this-&gt;login_database-&gt;login($data);
   if($result == TRUE) {
  
   $username = $this-&gt;input-&gt;post('username');
   $result = $this-&gt;login_database-&gt;read_user_information($username);
   if($result != false){
    $session_data = array(
     'username' =&gt; $result[0]-&gt;admin_username,
     'password' =&gt; $result[0]-&gt;admin_password);
   //Add user data in session
    $this-&gt;session-&gt;set_userdata('logged_in', $session_data);
    $this-&gt;load-&gt;view('Admin/admin_dashboard');
   }else{
   $data = array(
    'error_message' =&gt; 'Invalid Username or Password');
   $this-&gt;load-&gt;view('admin_login',$data);
   }
   }
   }
  
   
  }
  }
  ?&gt;</code></pre>
  </div>
  </div>
  </p>