Memcached and memcache Configuration tutorial Windows X64

Source: Internet
Author: User
Tags windows x64

The difference between memcached and memcache:

There are a few opinions about the differences between memcached and memcache on the Internet, and my personal understanding is:

Memcached is a memory cache system, and memcache is an extension of PHP, a tool that PHP uses to manipulate and manage memcached. If memcached is installed but not installed memcache,php cannot manipulate memcached, but you can use the command line to manipulate memcached, and if Memcache is installed and memcached is not installed, it cannot be used. You can use memcached in PHP only if you have memcached and Memcache installed at the same time.

The above represents only personal views.

Online about memcached and memcache installation of a lot of tutorials, below is I refer to the online tutorial and hands-on summary of the method, note that my operation is based on 64-bit Win7 system.

Second, installation memcached:

1.: Http://pan.baidu.com/s/1gdKbp8R

(This is found on the internet, I have tried, can be downloaded)

2. Unzip the downloaded file and put it in a directory, such as D:\memcached.

3. Open cmd, enter the directory after memcached decompression, run the command:

memcached.exe-d Install

If there are no surprises, the installation is successful.

(The directory should have memcached.exe this file)

4. Test whether the installation was successful:

Open cmd, enter the directory that memcached after decompression, run the command:

Memcached-h, if the installation is successful, the following interface will appear:

5. Start memcached:

Open cmd, enter the directory that memcached after decompression, run the command:

memcached.exe-d start

Now that the memcached has started, you can see the process in the Task Manager:

6. Connect the memcached:

Open cmd and run the command:

Telnet 127.0.0.1 11211

You can connect memcached.

Note: "Telnet is not an internal or external command" error may appear in Win7 because Telnet is not installed by default in the system, and can be opened in Windows features, programs and features, control Panel, programs, and functions. "Telnet Client".

Third, install the memcache PHP extension:

1.: http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/

(Note: To download DLL files that correspond to the PHP version and the number of system bits)

2. Place the Php_memcache.dll in the PHP ext directory, such as:

D:\wamp\bin\php\php5.5.12\ext

3. Open PHP.ini and add a line of code at extension:

Extension=php_memcache.dll

4. Restart the server.

5. View PHP Extensions services, Php_memcache should now be available, that is, in the hook state, the

Before is in the state of exclamation mark, if still in the state of exclamation mark, with the mouse click on the above just fine.

6. Test whether PHP is ready to use memcached by code:

$memcache = new Memcache;

$memcache->connect ("127.0.0.1", 11211);

echo "Memcached ' s version:". $memcache->getversion (). "<br/>";

$data = Array (

' url ' = ' https://code.endv.cn/',

' Name ' = ' programmer, at the end of the horizon '

);

$memcache, set ("Info", $data, 0,10);

$info = $memcache->get ("info");

Echo ' <pre> ';

Print_r ($info);

If you can print out the information in the memcache, then the PHP memcache extension has been installed successfully and can be used!

Note: If error fatal Error:class ' Memcache ' not found when running code, it may be downloaded

The Php_memcache.dll file does not match the PHP version or does not match the number of system bits.

My is 64 bit system, PHP version is 5.5.12, download is Php_memcache-3.0.8-5.5-ts-vc11-x64.zip

This file.

Memcached and memcache Configuration tutorial Windows X64

Related Article

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.