Skip to content
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

Session handler checking for memcached uses memcache functions. #21

Open
nhoobin opened this issue Jun 20, 2017 · 0 comments
Open

Session handler checking for memcached uses memcache functions. #21

nhoobin opened this issue Jun 20, 2017 · 0 comments

Comments

@nhoobin
Copy link
Contributor

nhoobin commented Jun 20, 2017

When checking the status of the session handler, it is hard coded to use '\core\session\memcached'.

$sessionhandler = (property_exists($CFG, 'session_handler_class') && $CFG->session_handler_class == '\core\session\memcached');

During the actual check, it uses a function 'memcache_connect()' which belongs to the php module 'memcache'.

memcache_connect($memcache[0], $memcache[1], 3);

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 nhoobin changed the title Session handle checking for memcached uses memcache functions. Session handler checking for memcached uses memcache functions. Jun 20, 2017
nhoobin added a commit that referenced this issue Jun 20, 2017
…ions

This now uses memcached functions to determine if the session handler is
valid. Additionally it adds support for Moodle PHP7 error handling.
nhoobin added a commit that referenced this issue Jun 23, 2017
Issue #21: Session handler checking for memcached
brendanheywood pushed a commit that referenced this issue Sep 25, 2017
…ions

This now uses memcached functions to determine if the session handler is
valid. Additionally it adds support for Moodle PHP7 error handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant