Php memcached system error

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

configure: error: invalid feature name: memcached-sasl=no #416

configure: error: invalid feature name: memcached-sasl=no #416

Comments

Attempting to build the new 3.1.0 release with PHP 7.3 on macOS 10.11, accepting all defaults I get this:

pecl install memcached pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0) pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0) downloading memcached-3.1.0.tgz . Starting to download memcached-3.1.0.tgz (82,407 bytes) . done: 82,407 bytes 15 source files, building running: phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731 Zend Extension Api No: 320180731 libmemcached directory [no] : zlib directory [no] : use system fastlz [no] : enable igbinary serializer [no] : enable msgpack serializer [no] : enable json serializer [no] : enable server protocol [no] : disable sasl [no] : disable sessions [no] : building in /private/tmp/pear/temp/pear-build-marcusNSCOrg/memcached-3.1.0 running: /private/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --disable-memcached-sasl=no --disable-memcached-session=no configure: error: invalid feature name: memcached-sasl=no ERROR: `/private/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --disable-memcached-sasl=no --disable-memcached-session=no' failed 

This seems to be a new problem in 3.1.0 as while the previous versions also failed to build with PHP 7.3, it got past this point. Answering yes to the sasl question doesn’t help.

The text was updated successfully, but these errors were encountered:

Thanks for reporting so quickly following the release.

Posted 3.1.1 to fix this. Please confirm.

It solves that problem, but I then get a different failure:

pecl install memcached  ✔  6024  14:07:07 pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0) pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0) downloading memcached-3.1.1.tgz . Starting to download memcached-3.1.1.tgz (82,472 bytes) . done: 82,472 bytes 15 source files, building running: phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731 Zend Extension Api No: 320180731 libmemcached directory [no] : zlib directory [no] : use system fastlz [no] : enable igbinary serializer [no] : enable msgpack serializer [no] : enable json serializer [no] : enable server protocol [yes] : enable sasl [yes] : enable sessions [yes] : building in /private/tmp/pear/temp/pear-build-marcusqDZkiL/memcached-3.1.1 running: /private/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=yes --enable-memcached-sasl=yes --enable-memcached-session=yes checking for grep that handles long lines and -e. /usr/bin/grep checking for egrep. /usr/bin/grep -E checking for a sed that does not truncate output. /usr/bin/sed checking for cc. cc checking whether the C compiler works. yes checking for C compiler default output file name. a.out checking for suffix of executables. checking whether we are cross compiling. no checking for suffix of object files. o checking whether we are using the GNU C compiler. yes checking whether cc accepts -g. yes checking for cc option to accept ISO C89. none needed checking how to run the C preprocessor. cc -E checking for icc. no checking for suncc. no checking whether cc understands -c and -o together. yes checking for system library directory. lib checking if compiler supports -R. no checking if compiler supports -Wl,-rpath. yes checking build system type. x86_64-apple-darwin15.6.0 checking host system type. x86_64-apple-darwin15.6.0 checking target system type. x86_64-apple-darwin15.6.0 checking for PHP prefix. /usr/local/Cellar/php/7.3.0 checking for PHP includes. -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib checking for PHP extension directory. /usr/local/Cellar/php/7.3.0/pecl/20180731 checking for PHP installed headers prefix. /usr/local/Cellar/php/7.3.0/include/php checking if debug is enabled. no checking if zts is enabled. no checking for re2c. re2c checking for re2c version. 1.1.1 (ok) checking for gawk. gawk checking whether to enable memcached support. yes, shared checking for libmemcached. yes, shared checking whether to enable memcached session handler support. yes checking whether to enable memcached igbinary serializer support. no checking whether to enable memcached json serializer support. no checking whether to enable memcached msgpack serializer support. no checking whether to enable memcached sasl support. yes checking whether to enable memcached protocol support. yes checking whether to use system FastLZ library. no checking for ZLIB. yes, shared checking for pkg-config. /usr/local/bin/pkg-config checking for zlib location. /usr checking for session includes. /usr/local/Cellar/php/7.3.0/include/php checking for memcached session support. enabled checking for memcached igbinary support. disabled checking for memcached msgpack support. disabled checking for libmemcached location. found version 1.0.18, under /usr/local/Cellar/libmemcached/1.0.18_2 checking for libmemcached sasl.h requirement. yes checking for ANSI C header files. yes checking for sys/types.h. yes checking for sys/stat.h. yes checking for stdlib.h. yes checking for string.h. yes checking for memory.h. yes checking for strings.h. yes checking for inttypes.h. yes checking for stdint.h. yes checking for unistd.h. yes checking sasl/sasl.h usability. yes checking sasl/sasl.h presence. yes checking for sasl/sasl.h. yes checking whether to enable sasl support. yes checking for sasl_client_init in -lsasl2. yes checking whether memcached_exist is defined. yes checking whether memcached_set_encoding_key is defined. yes checking for memcached protocol support. enabled checking whether libmemcachedprotocol is usable. no configure: error: Cannot enable libmemcached protocol ERROR: `/private/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=yes --enable-memcached-sasl=yes --enable-memcached-session=yes' failed 

I guess this may be an issue with the libmemcached I have installed from homebrew, though I think that’s current.

Читайте также:  Php print form action

My machine is still trying to download 3.1.0 . Is there a way to clear a cache?

Thanks, did that now but it doesn’t select 3.1.1 but 3.1.0

Had the same error as @Synchro, just answered no when pecl asked about it
enable server protocol [yes] : no .

That worked for me too, but it would be better if it worked anyway!

Is it possible to disable the server protocol via an env var? Otherwise this is difficult to automatically install.

I only have the issue in #416 (comment) with Debian, it works fine on Alpine Linux.

@ruudk I don’t no if it’s possible, try echo «\n\n\n\n\n\nno\n\n\n» | pecl install memcached or wrap install in a bash script and use expect .

3.1.2 released, please confirm if resolved now!

Works for me now, thank you!

Would be great to have a test for this in the CI 😉

Thanks everyone for confirming!

I’d like a CI test, too. The pecl and config options documentation for php extension authors are so limited, though. I have my limits on how much time I’ll invest into it. Separate issue anyhow, closing this out now.

Источник

Memcached::getResultCode

Memcached::getResultCode() возвращает одну из констант Memcached::RES_* , являющуюся результирующим кодом выполнения последнего Memcached метода.

Список параметров

У этой функции нет параметров.

Возвращаемые значения

Результирующий код последней выполненной операции Memcached.

Примеры

Пример #1 Пример использования Memcached::getResultCode()

$m = new Memcached ();
$m -> addServer ( ‘localhost’ , 11211 );

$m -> add ( ‘foo’ , ‘bar’ );
if ( $m -> getResultCode () == Memcached :: RES_NOTSTORED ) /* . */
>
?>

User Contributed Notes 2 notes

00 = MEMCACHED_SUCCESS
01 = MEMCACHED_FAILURE
02 = MEMCACHED_HOST_LOOKUP_FAILURE // getaddrinfo() and getnameinfo() only
03 = MEMCACHED_CONNECTION_FAILURE
04 = MEMCACHED_CONNECTION_BIND_FAILURE // DEPRECATED see MEMCACHED_HOST_LOOKUP_FAILURE
05 = MEMCACHED_WRITE_FAILURE
06 = MEMCACHED_READ_FAILURE
07 = MEMCACHED_UNKNOWN_READ_FAILURE
08 = MEMCACHED_PROTOCOL_ERROR
09 = MEMCACHED_CLIENT_ERROR
10 = MEMCACHED_SERVER_ERROR // Server returns «SERVER_ERROR»
11 = MEMCACHED_ERROR // Server returns «ERROR»
12 = MEMCACHED_DATA_EXISTS
13 = MEMCACHED_DATA_DOES_NOT_EXIST
14 = MEMCACHED_NOTSTORED
15 = MEMCACHED_STORED
16 = MEMCACHED_NOTFOUND
17 = MEMCACHED_MEMORY_ALLOCATION_FAILURE
18 = MEMCACHED_PARTIAL_READ
19 = MEMCACHED_SOME_ERRORS
20 = MEMCACHED_NO_SERVERS
21 = MEMCACHED_END
22 = MEMCACHED_DELETED
23 = MEMCACHED_VALUE
24 = MEMCACHED_STAT
25 = MEMCACHED_ITEM
26 = MEMCACHED_ERRNO
27 = MEMCACHED_FAIL_UNIX_SOCKET // DEPRECATED
28 = MEMCACHED_NOT_SUPPORTED
29 = MEMCACHED_NO_KEY_PROVIDED /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */
30 = MEMCACHED_FETCH_NOTFINISHED
31 = MEMCACHED_TIMEOUT
32 = MEMCACHED_BUFFERED
33 = MEMCACHED_BAD_KEY_PROVIDED
34 = MEMCACHED_INVALID_HOST_PROTOCOL
35 = MEMCACHED_SERVER_MARKED_DEAD
36 = MEMCACHED_UNKNOWN_STAT_KEY
37 = MEMCACHED_E2BIG
38 = MEMCACHED_INVALID_ARGUMENTS
39 = MEMCACHED_KEY_TOO_BIG
40 = MEMCACHED_AUTH_PROBLEM
41 = MEMCACHED_AUTH_FAILURE
42 = MEMCACHED_AUTH_CONTINUE
43 = MEMCACHED_PARSE_ERROR
44 = MEMCACHED_PARSE_USER_ERROR
45 = MEMCACHED_DEPRECATED
46 = MEMCACHED_IN_PROGRESS
47 = MEMCACHED_SERVER_TEMPORARILY_DISABLED
48 = MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE
49 = MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
11 = MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE = MEMCACHED_ERROR

Читайте также:  Запустить функцию заново python

A more up to date and correct list of the result codes (Note that ERR_NO maps to 26 not 25 as stated above):

Memcached::OPT_COMPRESSION — -1001
Memcached::OPT_SERIALIZER — -1003
Memcached::SERIALIZER_PHP — 1
Memcached::SERIALIZER_IGBINARY — 2
Memcached::SERIALIZER_JSON — 3
Memcached::OPT_PREFIX_KEY — -1002
Memcached::OPT_HASH — 2
Memcached::HASH_DEFAULT — 0
Memcached::HASH_MD5 — 1
Memcached::HASH_CRC — 2
Memcached::HASH_FNV1_64 — 3
Memcached::HASH_FNV1A_64 — 4
Memcached::HASH_FNV1_32 — 5
Memcached::HASH_FNV1A_32 — 6
Memcached::HASH_HSIEH — 7
Memcached::HASH_MURMUR — 8
Memcached::OPT_DISTRIBUTION — 9
Memcached::DISTRIBUTION_MODULA — 0
Memcached::DISTRIBUTION_CONSISTENT — 1
Memcached::OPT_LIBKETAMA_COMPATIBLE — 16
Memcached::OPT_BUFFER_WRITES — 10
Memcached::OPT_BINARY_PROTOCOL — 18
Memcached::OPT_NO_BLOCK — 0
Memcached::OPT_TCP_NODELAY — 1
Memcached::OPT_SOCKET_SEND_SIZE — 4
Memcached::OPT_SOCKET_RECV_SIZE — 5
Memcached::OPT_CONNECT_TIMEOUT — 14
Memcached::OPT_RETRY_TIMEOUT — 15
Memcached::OPT_SEND_TIMEOUT — 19
Memcached::OPT_RECV_TIMEOUT — 15
Memcached::OPT_POLL_TIMEOUT — 8
Memcached::OPT_CACHE_LOOKUPS — 6
Memcached::OPT_SERVER_FAILURE_LIMIT — 21
Memcached::HAVE_IGBINARY — #&UNDEFINED;#
Memcached::HAVE_JSON — #&UNDEFINED;#
Memcached::GET_PRESERVE_ORDER — 1
Memcached::RES_SUCCESS — 0
Memcached::RES_FAILURE — 1
Memcached::RES_HOST_LOOKUP_FAILURE — 2
Memcached::RES_UNKNOWN_READ_FAILURE — 7
Memcached::RES_PROTOCOL_ERROR — 8
Memcached::RES_CLIENT_ERROR — 9
Memcached::RES_SERVER_ERROR — 10
Memcached::RES_WRITE_FAILURE — 5
Memcached::RES_DATA_EXISTS — 12
Memcached::RES_NOTSTORED — 14
Memcached::RES_NOTFOUND — 16
Memcached::RES_PARTIAL_READ — 18
Memcached::RES_SOME_ERRORS — 19
Memcached::RES_NO_SERVERS — 20
Memcached::RES_END — 21
Memcached::RES_ERRNO — 26
Memcached::RES_BUFFERED — 32
Memcached::RES_TIMEOUT — 31
Memcached::RES_BAD_KEY_PROVIDED — 33
Memcached::RES_CONNECTION_SOCKET_CREATE_FAILURE — 11
Memcached::RES_PAYLOAD_FAILURE — -1001

Источник

Оцените статью