The memcached server is already installed and configured on my machine.
As shown in the following:
I then enter the following code in the PHP program:
$MC =new Memcache ();
$MC->connect (' 127.0.0.1 ');
An error occurred while running, prompting the following:
Notice:memcache::connect () [Memcache.connect]: Server 127.0.0.1 (TCP 11211, UDP 0) failed with: Unable to connect because the target machine is actively rejecting.
(10061) in E:\MyPHP\my.php on line 4
Warning:memcache::connect () [Memcache.connect]: Can ' t connect to 127.0.0.1:11211, because the target machine actively refused to connect.
(10061) in E:\MyPHP\my.php on line 4
Excuse me, do you have a solution?
Thank you.
Reply to discussion (solution)
Your Memcached service didn't start.
Test it with Telnet, if it's not even up there, it's upstairs.
1. PS Aux|grep memcache
See if Memcache's started.
2. If the memcache has a boot
Telnet 127.0.0.1 11211
See if we can connect.
1. PS Aux|grep memcache
See if Memcache's started.
2. If the memcache has a boot
Telnet 127.0.0.1 11211
See if we can connect.
Not even in my service manager, I don't see Memcache's services.
Open Memcache Server First
Then Telnet
Open Memcache Server First
Then Telnet
I'm using phpstudy, not found in the Phpstudy directory Memcache.exe
Didn't find Memcached.exe?
Then go and download a
Like Http://www.baidu.com/link?url=puGhUYDzYEnAYdXPdxrj7h18Mh3bfX7mj8QDN6wkvHJqvCx04KtVTKeMFO3mo31Xbe4UCKIqlqpkrF7Xj5q74K.
Open Memcache Server First
Then Telnet
I'm using phpstudy, not found in the Phpstudy directory Memcache.exe
Phpstudy is an integration package bar, memcache to install another, it seems that you do not have installed Memcache, but installed the expansion of Memcache
You have installed the PHP memcache extension, but you have not installed memcache.
You need to install memcache to use.
Download Address: http://www.oschina.net/p/memcached+for+win32/
Installation method: http://blog.csdn.net/yuhui_fish/article/details/7762299
OK, the problem is solved, thank you.