Open owngr opened 1 month ago
we have the same problem, no moosh command works. i can work around the problem by commenting out the line
$CFG->session_handler_class = '\core\session\redis';
in the config.php
moodle 4.5.0 php 8.1 moosh 1.14
Same here; all commands are failing. I do not want to add self::$BOOTSTRAP_FULL_NO_ADMIN_CHECK; for every command that I use, I need a most maintainable solution. moodle 4.5.0 php 8.2 moosh 1.21 and 1.24
Removing the config items means failing back to the standard session management, and that works, obviously.
I spent some hours to find a proper way to start a session from moosh, but already with the defined handler, in my case it is redis. No luck so far.
Related issue: https://github.com/tmuras/moosh/issues/500
I'm quite newby with PHP so it might not be the best solution.
cache-edit-mapping
Mostly just renaming the class following this document: https://github.com/moodle/moodle/blob/main/cache/UPGRADING.md
I had a strange problem where the Moosh login function failed with the following message, if redis was already used as a sessionhandler:
Warning: session_set_save_handler(): Session save handler cannot be changed when a session is active in /var/www/html/lib/classes/session/redis.php on line 235 [10-Oct-2024 16:28:36 Europe/Berlin] Default exception handler: Setting up of redis session failed. Please notify the server administrator. Debug: Error code: redissessionhandlerproblem
!!! Setting up of redis session failed. Please notify the server administrator. !!!
cache-add-redis-store
Use 3 digit versions number
I started by naming the folder Moodle45 but still received errors because moosh was using Moodle310 cache-add-redis-store.
Moodle started using 3 digits number version for branch in version.php with Moodle 310.
Therefore, when I tried to use the 45 version it would pickup Moodle 310 as 310 > 45 as you can see here:
The only way to make moosh pickup the right version was to refractor the whole numbering to start using 3 digit.