First, download
Find the full memcache Windows Installer, unzip it on your hard drive, such as F:\memcached.exe
Second, installation
WIN7 64-bit double-click Open this EXE may have only an empty window, cannot enter any command, so this exe is not used. To run the CMD console, enter the F:\memcached.exe-d install installation, and then enter F:\memcached.exe-d start.
Tips: If there is no error message, then this memcached has been installed and started, and the default is the boot automatically
Iii. PHP Extensions download and release notes
You can find the full Php_memcache.dll extension package on CSDN and select the extension download link >> for your PHP version. Note: TS refers to thread-safe, NTS is thread-insecure, can find the thread safety item in Phpinfo, and thread-safe if enabled.
Iv. PHP Extended Configuration
If you are using the WAMP integrated installation environment, the DLL extension file is placed in the/wamp/bin/php/php5.5.12/ext/directory by default, and the configuration file for PHP.ini is modified. Add a extension=php_memcache.dllto the back of the Extension=...dll row, and then restart Apache to see if there are memcache phpinfo.
But note that the PHP configuration file under Wamp is not/wamp/bin/php/php5.5.12/php.ini, but/wamp/bin/apache/apache2.4.9/bin/php.ini, That is to say Wamp really want to use php.ini file into Apache folder, this place is the first most tangled. The location of the specific configuration file may be changed, in fact, the information of the phpinfo will prevail.
If you are modifying the PHP directory in the php.ini, you will find that the memcache extension is not loaded, phpinfo no memcache information, open the menu in Wamp will see the php_memcache extension preceded by a red exclamation mark. This is because there is this DLL extension in the Ext directory, and this extension is not written in the real php.ini file. So to find the real php.ini file to add this extension
V. Code Test PHP successfully expanded the Memcache function
<? PHP $mem New Memcache; $mem->connect ("127.0.0.1", 11211); $mem->set (' key ', ' This is a test! ', 0, $); $val $mem->get (' key '); Echo $val;
If successful, it will show this is a test!
Otherwise, "Fatal error:class ' Memcache ' not found in ..." will be displayed with a similar error message and you will need to continue to see which step is wrong, or if the Memcache extension is not turned on.
Installation and PHP extension configuration for Windows Memcache