Welcome Guest, Not a member yet? Register   Sign In
ErrorException: ini_set() A session is active.
#5

(This post was last modified: 01-27-2024, 07:01 AM by berky.)

(01-26-2024, 09:17 PM)kenjis Wrote:
(01-26-2024, 09:05 PM)berky Wrote: My header helper literally just loads a few pure php files.

header.php
--> starts php session, so it can check whether or not user is logged in; redirecting user if not logged in
--> loads some javascript functions
--> displays navigation menu's that are the same for all pages

You start PHP session. So you cannot use CI4 Session class at the same time.
and if it displays (echo?) navigation menu, CI4 does not work properly after it.

If you use CI4, you must follow the framework.
You must not manipulate any HTTP header (including session cookie) and must not output (echo) anything.

Then is there a way to write my header/login check in CI4 space, and be able to import it from my pure php side? I am trying to avoid maintaining 2 equivalent files during the transition process.
Reply


Messages In This Thread
RE: ErrorException: ini_set() A session is active. - by berky - 01-27-2024, 07:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB