Can you see the link to help me to fix the problem?
https://stackoverflow.com/questions/50456461/memcached-not-working-in-web-browser-but-use-php-command-working?noredirect=1#comment88009305_50456461

2018-05-23 23:59 GMT+08:00 Daniel Ellis <[email protected]>:

> I don't know anything about the PHP client, but if you're going to telnet
> in, you need to read the protocol and make sure your messages are formed
> correctly: https://github.com/memcached/memcached/blob/
> master/doc/protocol.txt#L132
>
> You're missing things like the number of bytes of data to follow, the
> newlines, the expiry time, and the flags.
>
> On Tue, May 22, 2018 at 6:15 PM, 敬錞潘 <[email protected]> wrote:
>
>> I have testMemcached.php code below.
>>
>> <?php
>>  include_once "common.php";
>>  include_once "api.php";
>>  class TestMemcached extends API{
>>    function impl(){
>>         $m = $this->getMem();
>>         $stats = $m->getStats();
>>         var_dump($stats);
>>         $m->add("Key","test");
>>         echo "Value:".$m->get("Key");
>>    }
>>  }
>>  $api = new TestMemcached();
>>  $api->go();
>>
>> I run testMemcached.php in the web browser. I get bool(false) Value:
>>
>>  I use telnet 127.0.0.1 11211 to test memcached function I found the addand 
>> set is not working.
>>
>> Trying 127.0.0.1...
>> Connected to 127.0.0.1.
>> Escape character is '^]'.
>> set test testValue
>> ERROR
>> add test testValue
>> ERROR
>> get test
>> END
>>
>> How to fix it?
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "memcached" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to