Php+memcache extension (Integrated environment wampserver environment)

Source: Internet
Author: User

Follow the steps of others, install and configure without any error prompts! In the computer service also see memcached service has been opened, but phpinfo inside is no memcache has been installed successfully information! Later found that the original is not open wamp PHP extension inside the memcache extension ( left click Wampserver in the lower right corner of the computer icon->php->php Extension (H), find Php_ Memcache Click to open (a small check mark appears before the name).

When looking for the cause, it is the Php_memcache.dll version and the PHP version inconsistency (workaround: Download the corresponding version of the DLL file) to see others ' error resolution.

Own steps to record:

1. Installing memcached

A. Download the memcached installation package, unzip to find the Memcached.exe copy to the C packing directory

B. Run Cmd.exe as Administrator (Command prompt-run as administrator), and normally run CMD directly.

C. Transfer to c packing directory execute command:

memcached.exe-d Install Installation

memcached.exe-d Start Open

d. Execute command Netstat-an , with the following results:

Indicates that the installation was successful.

Memcache Extensions for 2.php

The Php_memcache.dll file (\wamp\bin\php\php5.2.9-2\ext) is already in the integrated environment and does not need to be downloaded. Others may need to download the corresponding version of the DLL file to be placed in the Php/ext directory.

Add a sentence in the php.ini file:extension=php_memcache.dll, load the extension function.

Then left-click on the Wampserver icon in the lower right corner of the computer->php->php extension (H), find Php_memcache Click to open (a small checkmark before the name).

Finally, restart the server .

Test code:

    < PHP
$mem = new Memcache;
$mem->connect ("127.0.0.1", 11211);
$mem->set (' key ', ' This is a test! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;
?>

Php+memcache extension (Integrated environment wampserver environment)

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.