Php extension cannot connect to the memcached server, online, etc. please kindly advise!

Source: Internet
Author: User
Php extension cannot connect to the memcached server, online, etc. please kindly advise! The memcached server is also installed.

Php extensions are also installed


But can't I connect to the server using code?


Php. ini is configured



Reply to discussion (solution)

$ M-> get ('int ')??

$ M-> get ('int ')??



I changed the status of the server.

Is the memcached service started? Port 11211 is enabled?


Is the memcached service started? Port 11211 is enabled? [/Q
Start and open the port

How does one feel connected?

There is no connection problem, it is your code problem.
$ Memcached-> set
$ M-> get

Different variables.

To check whether memcache is enabled, telnet 127.0.0.1 11211.
Enter stats

The server first telnet 127.0.0.1 11211. can this problem be solved? Code issues.

A $ memcached variable and a $ m variable can be used normally?

To check whether memcache is enabled, telnet 127.0.0.1 11211.
Enter stats



I modified the code. This is the server status. No problem.


$ M = new Memcached ();
$ M-> addServer ('localhost', 11211 );

$ M-> set ('foo', 100 );
Var_dump ($ m-> get ('Foo '));

?>
Code. Bool (false) is returned for the test. why?

Problem added: getResultMessage () returned error message: "server has failed and is disabled until timed retry"

SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY
Server failed and disabled. please restart later

Disable SElinux:
Temporarily disable and restart the invalid command: setenforce 0
Permanently Close. modify the configuration file:
Modify the/etc/selinux/config file
Change SELINUX = enforcing to SELINUX = disabled
After modification, you must restart the instance. However, if you do not want to restart the instance, set the temporary shutdown method to take effect first.
Setenforce 0


A solution has not been tried yet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.