Win8.1 (x64) build memcached

  

(1) memcached installation file

libgcc_s_sjlj-1.dll memcached.exe pthreadGC2.dll php_memcache.dll

(2) installation steps ( Note that you want to install under administrator privileges)

1 Put memcache.exe, libgcc_s_sjili-1.dll, pthreadGC2.dll in the php installation directory
2 Copy php_memcache.dll to the php installation directory In the ext folder, add the following extension=php_memcache.dll

to the end of the php.ini file. 3. Find cmd.exe in the C:\\Windows\\System32 directory, right click and execute with administrator privileges. Go to your php directory and execute memcached -d install. The installation is successful without prompts.

If you are prompted that the installation failed or you have already installed it, you are not executing cmd.exe under administrator privileges. >4. Start memcache, go to the php installation directory, execute memcached.exe -d start, open the memcache service

5. Restart apache, then you can use memcached under php

(3) under telnet Using memcached, win8.1 disables teln by default Et service, can enter the control panel -> program -> enable or disable the windows function, hook the telnet server and telnet client, enter the dos interface, execute

telnet 127.0.0.1 11211, You can enter the telnet window operation

(4) memcached common commands

memcached basic commands (installation, uninstallation, startup, configuration related):
-p listening port -l connection IP address, the default is native -d start Start memcached service -d restart Restart memcached service -d stop| Shutdown Shut down the running memcached service -d install Install the memcached service -d uninstall Uninstall the memcached service -u Run as follows (only valid when running as root) -m Maximum memory usage, in megabytes. The default 64MB-M memory returns an error, instead of deleting the item -c maximum simultaneous connection number, the default is 1024-f block size growth factor, the default is 1.25-n minimum allocation space, key+value+flags default is 48

-h show help

For example, start

memcached -d start

The memory of the required memcached is greater than 64m, which should be started

memcached – m 256m –d start

If you want to change a port

memcached -d -m 30 -l 127.0.0.1 -p 9000 -d start
Data operation command format: < ;command name> <key> <flags> <exptime> <bytes>

<data block>

Common commands can be found in this buddy's blog, classics are clear

(5) php code using memcached, you can directly view the official documentation

Copyright © Windows knowledge All Rights Reserved