CI 3.1.11 session library location and load |
I'm using the latest version of CI and I have problems to load the Session Class.
First I noticed that the class-file isn't in the 'standard location' (system/libraries) but instead in session/libraries/Session. Second even if I try to load the library in the correct way with PHP Code: $this->load->library('session/session'); in the head of my class definition AFTER parent::__construct(); I get the following error message(s): Quote:Unable to load the requested class: Session I'm pretty sure to have been overlooking something as I am actually shaken by a cold too. Any help as always very appreciated! Greets Guido
3.1.11 is the latest in the 3.x branch, but the latest version is the brand new 4.0.2. I recommend using this version, because a lot have change since 3.x.
Anyway, to load the session library in 3.x, you just need to call $this->load->library(‘session’) as explained in the User guide.
If it's located in a different folder when /system/libraries/session you have a broken CI. Please download a fresh copy.
As per the documentation, you should load it like this. No library are loaded with a subfolder. https://codeigniter.com/user_guide/libra...-a-session PHP Code: $this->load->library('session');
I removed the 3.1.1 installation and replaced it by the 4.0 version.
Now, after I set it all up I get the following error message (in development more): SYSTEMPATH/ThirdParty/Kint/init.php at line 46
Upgrading from CI 3 into CI 4 needs pretty much a complete rewrite of your application, it's not a drop in replacement.
https://codeigniter4.github.io/userguide...e_4xx.html Stick with CI 3, and solve the problem at hand. |
Welcome Guest, Not a member yet? Register Sign In |