How to do PHP configuration memcache in Windows environment _php tutorial

Source: Internet
Author: User
Tags phpinfo
First of all, install PHP and Apache environment.
I'm using a wamp integrated kit.
PHP 5.2.8
Apache 2.2.1.1
When these are all ready,
Go to memcache official website to download Memcache.exe this program under Windows

And put him under the C:\memcache directory.
Open cmd command input
CD C:\memcache

Installation
Memcache.exe-p Install

After installation is complete
Memcache.exe-p start

After successfully opening Memcache

Just put Php_memcache.dll in the Php/ext directory.

Then add a piece of content to the php.ini in the PHP directory
Extension=php_memcache.dll

After the addition, restart Apache

Then output phpinfo () on the PHP page;

Check that the memcache is loaded successfully.


If the load is successful, you can do the memcache test on a php page.

Phpinfo ();

$memcache = new Memcache;
$memcache->connect (' 127.0.0.1 ', 11211) or die (' shit ');

$memcache->set (' key ', ' Hello memcache! ');

$out = $memcache->get (' key ');

Echo $out;

Successful words will output

Hello memcache!

http://www.bkjia.com/PHPjc/327535.html www.bkjia.com true http://www.bkjia.com/PHPjc/327535.html techarticle first of all, install PHP and Apache environment. I'm using Wamp integrated suite PHP 5.2.8 Apache 2.2.1.1 These are ready to go to the Memcache official website to download the memcache under Windows ...

  • 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.