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

(01-27-2024, 07:00 AM)berky Wrote: 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.

You cannot use PHP Session and CI Session at the same time.
Because CI Session is based on PHP Session. After all, they use the same PHP Session feature.
CI Session is an extension of PHP Session.

So it might be better to use CI Session in your pure PHP script.
But I don't know you can do it easily.

This shows how to use CI classes in pure PHP file.
https://github.com/codeigniter4/translat...p/bin/test
It uses CodeIgniter\CLI\CLI class.
Reply


Messages In This Thread
RE: ErrorException: ini_set() A session is active. - by kenjis - 01-27-2024, 04:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB