-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moodle 4.5 incompatibility if redis session handler is configured. #503
Comments
Related:
|
What if we add a global option to moosh to over-write any $CFG setting in config.php? |
|
Ok, I have found a solution: This will force the script to use the configured session handler before starting the session. Otherwise, the built-in file handler will be used.
I'm pretty sure that with better knowledge or further investigation, a cleaner solution can be found to force moodle to use the session handler from moosh when starting the session. |
Option to not login as admin user when executing a command. Shuold help with #503.
Actual behaviour
I have a moodle instance with confiured redis session cache in config.php:
$CFG->session_handler_class = '\core\session\redis';
Then I execute ANY moosh command, it fails:
root@install:/var/www/mdl# sudo -u www-data /opt/moosh/moosh.php filter-set multilang 1
Warning: session_set_save_handler(): Session save handler cannot be changed when a session is active in /var/www/mdl/lib/classes/session/redis.php on line 235
!!! Setting up of redis session failed. Please notify the server administrator. !!!
!!
Error code: redissessionhandlerproblem !!
!! Stack trace: * line 237 of /lib/classes/session/redis.php: core\session\exception thrown
!!
Expected behaviour
Run, without error.
Steps to reproduce
$CFG->session_handler_class = '\core\session\redis';
$CFG->session_redis_host = '127.0.0.1';
$CFG->session_redis_port = 6379;
$CFG->session_redis_prefix = 'mdl2_session_';
The text was updated successfully, but these errors were encountered: