Skip to content
This repository

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

Merged
merged 1 commit into from over 1 year ago

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
Ilia Alshanetsky iliaal closed this
David Terei dterei deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 03, 2013
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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 php_memcached.c
5 php_memcached.c
@@ -2413,6 +2413,11 @@ static PHP_METHOD(Memcached, setSaslAuthData)
2413 2413 return;
2414 2414 }
2415 2415
  2416 + if (!MEMC_G(use_sasl)) {
  2417 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SASL support (memcached.use_sasl) isn't enabled in php.ini");
  2418 + RETURN_FALSE;
  2419 + }
  2420 +
2416 2421 MEMC_METHOD_FETCH_OBJECT;
2417 2422
2418 2423 if (!memcached_behavior_get(m_obj->memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)) {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.