moodle-tool_heartbeat icon indicating copy to clipboard operation
moodle-tool_heartbeat copied to clipboard

Session handler checking for memcached uses memcache functions.

Open nhoobin opened this issue 7 years ago • 0 comments

When checking the status of the session handler, it is hard coded to use '\core\session\memcached'. https://github.com/catalyst/moodle-tool_heartbeat/blob/fa9788750002907980d65e7af10c8d228fc131ab/index.php#L111

During the actual check, it uses a function 'memcache_connect()' which belongs to the php module 'memcache'. https://github.com/catalyst/moodle-tool_heartbeat/blob/fa9788750002907980d65e7af10c8d228fc131ab/index.php#L117 If the server is not using the memcache extension a fatal error will be thrown.

Additionally the Moodle error handling has changed with PHP7 https://docs.moodle.org/dev/Moodle_and_PHP7#Exception_and_Throwable and diagnosing that there is an issue with the previous code will return a HTTP status code 500.

nhoobin avatar Jun 20 '17 00:06 nhoobin