How to install and use memcached in Windows for PHP?

后端 未结 4 641
执念已碎
执念已碎 2020-12-15 00:01

I have installed memcached binary file in Windows 7 and started it as server.

When I type wmic process get description, exetuablepath | findstr memcached.exe I get t

4条回答
  •  醉梦人生
    2020-12-15 00:27

    A note to anyone who runs into issues with getting memcached working on Windows.

    • For starters ensure that you have the right version of the memcached dll and that it is accessible. There is a wide selection available at http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/ and it is all too easy to choose the wrong version of memcached!.
    • If you are running PHP 5.5 you will additionally require php5.dll. You can get this here
    • You may need to edit your environment PATH settings so this dll can be found. Go to My Computer->Properties->advanced and click on Environment Variables to view/edit the path. You need to restart the computer if you edit this.
    • Ensure that the memcached server is installed. Ctrl + Alt + Del and check that memcached is present in your list of services
    • If not you need to *install it from the Cmd prompt run as administrator (from the start menu, choose accessories, click on command prompt and choose to run as administrator) c:\pathtomemcached\memcached.exe -d install
    • follow this with c:\pathtomemcached\memcached.exe -d start or net start “memcached Server”. On my installation the former does not work
    • Likewise I am unable to start memcached from the Services tab of the Task Manager
    • It is handy to be able to play around with memcached at a low level so enable telnet, if required, and from the command prompt type telnet. Now open port 11211 and try using memcached
    • It is also useful to be able to keep tabs on what is happening in memcached. phpMemCacheAdmin is by far the best tool for the job

提交回复
热议问题