Hello.
I am having troubles with configuring memcached.
I have installed Moodle 3.5, PHP7, Ubuntu 16.04
1) I have added those lines in moodle/config.php:
$CFG->session_handler_class = '\core\session\memcached';
$CFG->session_memcached_save_path = '127.0.0.1:11211';
$CFG->session_memcached_prefix = 'memc.sess.key.';
$CFG->session_memcached_acquire_lock_timeout = 120;
$CFG->session_memcached_lock_expire = 7200;
2) In /etc/php/7.0/fpm/pool.d/www.conf I have this settings:
php_admin_value[session.save_path] = "127.0.0.1:11211"
php_admin_value[session.save_handler] = "memcached"
3) I have 2 memcached instances, for MUC, and for sessions. For MUC I use 127.0.0.1:11212. And I am planning to use 127.0.0.1:11211 for sessions.
/usr/bin/memcached -m 128 -p 11212 -U 0 -u moodle -l 127.0.0.1
/usr/bin/memcached -m 128 -p 11211 -U 0 -u moodle -l 127.0.0.1
Config /etc/memcached_sessions.conf :
-d
logfile /var/log/memcached.log
-m 128
-p 11211
-U 0
-u moodle
-l 127.0.0.1
When I open moodle page, I got error:
Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
But if I remove php_admin_value[session.save_path] and php_admin_value[session.save_handler] lines from /etc/php/7.0/fpm/pool.d/www.conf - moodle is working.
How can I debug this error? What can cause this error?
I have also created phpinfo.php page just to check settings, while moodle is unavailable.
And if I opened it - I can see session section (see screenshot 1). Does it mean that memcached is working but only moodle can't work with it?
And on screenshot 2 - settings from moodle phpinfo page - when I removed those lines. Session save handler is set to "files"