We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<?php // Use direct access to memcached $memcached = fsockopen ("unix:///var/run/memcached/memcached.sock",-1); if (!$memcached) { echo "$errstr ($errno)\n"; } $key = 'key'; $flags = 1; $expire = 1000; $data = "test"; $length = strlen($data); if (!fwrite($memcached, "set {$key} {$flags} {$expire} {$length}\r\n{$data}\r\n")) { throw new Exception('Memcached write error.'); } // Now try get key thru php-memcached $phpmemcached = new Memcached(); $phpmemcached->setOptions([ \Memcached::OPT_COMPRESSION => false, \Memcached::OPT_BINARY_PROTOCOL => true ]); $phpmemcached->setOption(Memcached::OPT_USER_FLAGS, 1); $phpmemcached->addServer('/var/run/memcached/memcached.sock', 0); $value = $phpmemcached->get($key, null, Memcached::GET_EXTENDED); var_dump($value); /* /array(3) { 'value' => int(0) 'cas' => int(35) 'flags' => int(0) Where is my data??? */
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: