Welcome Guest, Not a member yet? Register   Sign In
CI 3.1.13 Unable to locate the specified class: Session.php
#4

(09-18-2024, 09:43 AM)LuizFilipe Wrote:
(09-18-2024, 02:05 AM)Smekke Wrote: So I've inherited an old CI 3 project running on PHP7.0

I've upgrade to the latest CI 3 version and I want to make the change to PHP7.4 so that I can keep upgrading to CI 4, then upgrade to PHP8 etc.

95% of the site works fine but on some pages, I just get a blank page saying "Unable to locate the specified class: Session.php"


These are my autoloaded libraries:

Code:
$autoload['libraries'] = array('database','session','lib_smarty','module','form','tank_auth','user_auth');


I've looked through the forum for topics with a similar problem but most were either unresolved and/or their solution didn't work for me.
I've already installed a fresh copy of CI 3.1.13.

If I remove all libraries from the autoload, I am greeted with the following error.

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Module::$session

Filename: core/Model.php

Line Number: 74

I don't know which version you started migrating from but the session library was completely rewritten. Did you follow the steps shown here? https://codeigniter.com/userguide3/insta...ading.html

I started from 3.0.4.
I did see in another topic someone said that going from 2.X to 3.0 there might be issues if you do not delete the system folder.
I've done that just to be sure but to no avail.

There is some improvement. Whenever I drop "model" from autoload libraries and mod_pages (a custom mod) from autoloaded models, the pages seem to work.
The rest of the site bricks because they don't get loaded, but I was thinking if I can adjust the rest to load the library and mod individually, it might just work.
Reply


Messages In This Thread
RE: CI 3.1.13 Unable to locate the specified class: Session.php - by Smekke - 09-18-2024, 11:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB