Exception - Class 'core\session\handler' not found

Exception - Class 'core\session\handler' not found

by Emma Corry -
Number of replies: 9
Hi, this is the message I get when I visit my site today.

Does anyone have any ideas what to do here?

Thank you.
Average of ratings: -
In reply to Emma Corry

Re: Exception - Class 'core\session\handler' not found

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What changed between it working and it not working? Something did.

Switch on Debugging via your config.php file. This should produce a full trace of the error which will help us.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Exception - Class 'core\session\handler' not found

by Emma Corry -
I would turn it on if I could access anything.

It's a small site that we don't use often - just when training clients, but I was going to add a course for clients today and this is the message I get.

I can't login to my admin panel.
In reply to Emma Corry

Re: Exception - Class 'core\session\handler' not found

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
When you say admin panel, do you mean your webhost cpanel - at some point, you will have to get that login working...your webhost should be able to help you.
If you mean you can't log into your moodle site, try going to yoursite.com/login/index.php if you are just trying to log into your site and see if you can log in there...
If this doesn't work, then you need to google how to turn on debugging in your config file. Once you have a better message, come back here and also tell us what version of moodle and where it is hosted.
You could also try deleting the cache and local cache folders in your moodleDATA folder (NOT THE moodle code folder).
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Exception - Class 'core\session\handler' not found

by Emma Corry -
Managed to turn on debugging via config file.

Debug info:
Error code: generalexceptionmessage
Stack trace:
line 36 of /lib/classes/session/file.php: Error thrown
line 136 of /lib/classes/component.php: call to include_once()
line ? of unknownfile: call to core_component::classloader()
line 268 of /lib/classes/session/manager.php: call to spl_autoload_call()
line 113 of /lib/classes/session/manager.php: call to core\session\manager::load_handler()
line 829 of /lib/setup.php: call to core\session\manager::start()
line 1117 of /config.php: call to require_once()
line 94 of /admin/index.php: call to require()

Looking at lib/classes/session folder, the handler.php file has an error with an orange warning sign and its not able to open
In reply to Emma Corry

Re: Exception - Class 'core\session\handler' not found

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think the last bit is probably the problem. Sounds like a corrupted file of some description - although I obviously know nothing about your hosting arrangements. Does your hosting company have a support contact who you can ask why that file is given problems?
Average of ratings: Useful (1)
In reply to Emma Corry

Re: Exception - Class 'core\session\handler' not found

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It sounds like that file might be corrupt. Try replacing it by:

  1. Renaming the existing handler.php file in the lib/classes/session folder, for example to handler.php.old.
  2. Save this file as handler.php.
  3. Upload it to the lib/classes/session folder on your host.
If that doesn't work can you share a screenshot of the files in your lib/classes/session folder?
Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Exception - Class 'core\session\handler' not found

by Emma Corry -
The handler file will not let me rename, move or replace it via ftp

Unable to rename "handler.php".
"handler.php" is locked and can not be renamed, moved or removed.
In reply to Leon Stringer

Re: Exception - Class 'core\session\handler' not found

by Emma Corry -
I've contacted my hosting company to look at the file with a view to replacing it. Thank you
In reply to Emma Richardson

Re: Exception - Class 'core\session\handler' not found

by Emma Corry -
$version = 2022041901.02;