![]() |
Problem with session handling - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Problem with session handling (/showthread.php?tid=90737) |
Problem with session handling - Julesb - 04-25-2024 Hi I've just upgraded to version 4.4.8 I have a session service of my own which I am using, however this now seems to clash with the codeigniter session service. I get the following ErrorException ini_set(): A session is active. You cannot change the session module's ini settings at this time SYSTEMPATH/Session/Handlers/FileHandler.php at line 72 Code: 65 Code: if (isset($_SESSION)) { Jules RE: Problem with session handling - kenjis - 04-25-2024 1. Replace Session class with your Session class 2. Replace CodeIgniter class, and remove the if statement See https://codeigniter4.github.io/CodeIgniter4/extending/core_classes.html#replacing-core-classes RE: Problem with session handling - Julesb - 04-26-2024 Hi Kenjis Thanks for the ideas Had a long look at various solutions, replacing the session class was just a pain as it did not fix the problem and caused others. Ended editing Codeigniter.php Line 1069 now reads Code: if (isset($_SESSION)) { Basically as its a string returned by URI::createURIString you don't really need the complex session handling stuff, not an optimum solution though. Managed to get my brain in gear, replaced the CodeIgniter class with my own. |