Welcome Guest, Not a member yet? Register   Sign In
Do not use the CI 4 session library
#1

Today I have the PHP Session with Redis configuration, with fallback, name configuration, etc., all defined in my php.ini file, however in CI4 I cannot use PHP's native session_start() to create my sessions.


In CodeIgniter 3 I could just remove it from autoload and that's it, but now it's not possible.

Every time I try to use session_start() this message appears. Suggesting that CodeIgniter automatically initialized the session. Something I don't want.


Code:
ini_set(): Session ini settings cannot be changed when a session is active

If I execute the session()->close(); below before session_start(), another error appears.

Code:
ini_set(): Session ini settings cannot be changed when a session is active

SYSTEMPATH/Session/Handlers/FileHandler.php at line 72

How can I focus on using only session_start(), even though I know it is more archaic.
Reply


Messages In This Thread
Do not use the CI 4 session library - by ElTomTom - 03-25-2024, 07:14 AM
RE: Do not use the CI 4 session library - by joho - 03-26-2024, 04:04 PM
RE: Do not use the CI 4 session library - by joho - 03-28-2024, 07:49 AM
RE: Do not use the CI 4 session library - by joho - 03-28-2024, 04:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB