Welcome Guest, Not a member yet? Register   Sign In
Turn off CI4 Session handling in v4.5.1 ?
#1

(This post was last modified: 06-04-2024, 12:24 AM by codeus.)

Hello,
CI project was on v4.3, recently upgraded to v4.5.1.

Now Session settings are in new config file Session.php, it does not appear to be possible to turn off CI Session handling. In my BaseController, a session is created (outside of CI4), and the error below appears, because my session has indeed already been started.

There appears to be nothing in CI docs about disabling CI Session handling. Is it possible to disable now?

TIA
Mike

PHP: 8.2.19 — CodeIgniter: 4.5.1 -- Environment: development

Code:
ErrorException
ini_set(): Session ini settings cannot be changed when a session is active
SYSTEMPATH/Session/Handlers/FileHandler.php at line 74

Code:
67
68     public function __construct(SessionConfig $config, string $ipAddress)
69     {
70         parent::__construct($config, $ipAddress);
71
72         if (! empty($this->savePath)) {
73             $this->savePath = rtrim($this->savePath, '/\\');
74             ini_set('session.save_path', $this->savePath);
75         } else {
76             $sessionPath = rtrim(ini_get('session.save_path'), '/\\');
77
78             if ($sessionPath === '') {
79                 $sessionPath = WRITEPATH . 'session';
80             }
Reply


Messages In This Thread
Turn off CI4 Session handling in v4.5.1 ? - by codeus - 06-03-2024, 04:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB