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.Dismiss alert
When running memcached server with options: memcached -l 127.0.0.1 -U 0 -p 11211 -vvvv -u memcached -S
And then connecting with PHP 7.4 using:
$mc = new \Memcached();
$mc->addServer('127.0.0.1', 11211);
$mc->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
$mc->setSaslAuthData($username, $password);
When you set data via: $ok = $mc->set('abc', 'value', 1800);
The value of $ok will be returned false, but the data will appear on the server some time later.
In the meantime, an immediate call to $v = $mc->get('abc'); will fail, but eventually work and return the value.
When SASL is disabled on the server (IE: no -S option), and the setOption() and setSaslAuthData() methods are not used, the value of $ok when performing the set() operation returns true, and an immediate get() call returns the data.
Is there some asynchronous operation happening that is unexpected when using SASL authentication? Is this a php_memcached bug, or a configuration problem in memcached?
I should add that the memcached server is running on CentOS 7 with the cyrus-sasl SASL library using a config file in /etc/sasl2/memcached.conf that has content:
When running memcached server with options:
memcached -l 127.0.0.1 -U 0 -p 11211 -vvvv -u memcached -S
And then connecting with PHP 7.4 using:
When you set data via:
$ok = $mc->set('abc', 'value', 1800);
The value of
$ok
will be returnedfalse
, but the data will appear on the server some time later.In the meantime, an immediate call to
$v = $mc->get('abc');
will fail, but eventually work and return the value.When SASL is disabled on the server (IE: no
-S
option), and thesetOption()
andsetSaslAuthData()
methods are not used, the value of$ok
when performing theset()
operation returnstrue
, and an immediateget()
call returns the data.Is there some asynchronous operation happening that is unexpected when using SASL authentication? Is this a php_memcached bug, or a configuration problem in memcached?
I should add that the memcached server is running on CentOS 7 with the cyrus-sasl SASL library using a config file in
/etc/sasl2/memcached.conf
that has content:The text was updated successfully, but these errors were encountered: