Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Warn if trying to use SASL when memcached.use_sasl is off. #52

Merged
merged 1 commit into from

2 participants

David Terei Ilia Alshanetsky
David Terei
Owner

Without this, a far less helpful error message from the underlying
libmemcached library would be reported.

David Terei Warn if trying to use SASL when memcached.use_sasl is off.
Without this, a far less helpful error message from the underlying
libmemcached library would be reported.
699ac64
Ilia Alshanetsky iliaal merged commit ca92345 into from
David Terei dterei deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 3, 2013
  1. Warn if trying to use SASL when memcached.use_sasl is off.

    David Terei authored
    Without this, a far less helpful error message from the underlying
    libmemcached library would be reported.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 php_memcached.c
5 php_memcached.c
View
@@ -2413,6 +2413,11 @@ static PHP_METHOD(Memcached, setSaslAuthData)
return;
}
+ if (!MEMC_G(use_sasl)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "SASL support (memcached.use_sasl) isn't enabled in php.ini");
+ RETURN_FALSE;
+ }
+
MEMC_METHOD_FETCH_OBJECT;
if (!memcached_behavior_get(m_obj->memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)) {
Something went wrong with that request. Please try again.