ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in codeigniter ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in codeigniter codeigniter codeigniter

ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in codeigniter


ob_start();

on the first line of index.php in root directory. This works.


Open the config.php and add ob_start(); it will help to delay the sending of the HTTP header

Look at the example below

<?phpdefined('BASEPATH') OR exit('No direct script access allowed');ob_start();


For me the error occured because i accidentally added some empty lines after php closing bracket ?> in a helper class i loaded before loading the session library.