![]() |
CI 3.1.11 session library location and load - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: CI 3.1.11 session library location and load (/showthread.php?tid=75767) |
CI 3.1.11 session library location and load - bitshifter - 03-14-2020 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 RE: CI 3.1.11 session library location and load - includebeer - 03-14-2020 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. RE: CI 3.1.11 session library location and load - jreklund - 03-14-2020 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/libraries/sessions.html#initializing-a-session PHP Code: $this->load->library('session'); RE: CI 3.1.11 session library location and load - bitshifter - 03-14-2020 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 RE: CI 3.1.11 session library location and load - mjamilasfihani - 03-15-2020 (03-14-2020, 06:06 PM)bitshifter Wrote: I removed the 3.1.1 installation and replaced it by the 4.0 version. Try to install with composer, I've done with that RE: CI 3.1.11 session library location and load - bitshifter - 03-15-2020 Yeah I have done that... Thanks. RE: CI 3.1.11 session library location and load - jreklund - 03-15-2020 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/installation/upgrade_4xx.html Stick with CI 3, and solve the problem at hand. |