Skip to content
Advertisement

PHP Codeigniter Session error: Message: session_cache_limiter(): Cannot change cache limiter when session is active

php -v:7.3.11

codeigniter -v:3.0.3

A PHP Error was encountered
Severity: Warning

Message: session_cache_limiter(): Cannot change cache limiter when session is active

Filename: core/MY_Controller.php

Line Number: 24

Backtrace:

File: G:xamphtdocssales_proasiteapplicationcoreMY_Controller.php
Line: 24
Function: session_cache_limiter

File: G:xamphtdocssales_proasiteapplicationcontrollersadminLogin.php
Line: 16
Function: __construct

File: G:xamphtdocssales_proasiteindex.php
Line: 309
Function: require_once

I tried commenting out the following lines in system/libraries/session/session.php but not working

session_start()
ini_set('session.use_trans_sid', 0);
ini_set('session.use_strict_mode', 1);
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.hash_function', 1);
ini_set('session.hash_bits_per_character', 4);

I also tried

 if(!isset($_SESSION)){
        session_start();
 }

Advertisement

Answer

swithched codeigniter version to 3.1… And the issue solved

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement