How to install memcache in php 5.3.10

藏色散人
Release: 2023-03-09 14:48:01
Original
1902 people have browsed it

How to install memcache in php 5.3.10: 1. Unzip memcached to the specified directory; 2. Unzip "memcached-win32-1.4.4-14.zip"; 3. Enter cmd; 4. Unzip the corresponding zip file; 5. Modify php.ini; 6. Restart the service.

How to install memcache in php 5.3.10

The operating environment of this article: Windows7 system, php5.3.10 version, DELL G3 computer

Install memcache under win7 php5.3.10

Because I upgraded to 5.3.10, the previous dll cannot be used. After working on it for a long time, I finally found a solution on a foreigner’s blog:

(The environment is win7 php5 .3.10 win32)

1. Unzip the memcached attachment to a certain directory. In this example, extract it in F:\

2. Unzip the memcached-win32-1.4.4-14 in the attachment. zip

3. Enter cmd, enter:

  F:\memcached\memcached-win32-1.4.4-14\memcached.exe -d install
Copy after login

Enter

  F:\memcached\memcached-win32-1.4.4-14\memcached.exe -d start
Copy after login

4. Unzip php_memcache-php-5.3.10.0-r2-win32-vc9-standard.zip , and copy it to php5.3.10\ext (assuming you are using the WAMP integrated environment, it should be \wamp\bin\php\php5.3.10\ext)

5. Add a line in php.ini :”extension=php_memcache.dll

6. Restart apache, open phpinfo and you will see memcache!

The test code is as follows:

<?php
$memcache = new Memcache;
$memcache->connect(&#39;127.0.0.1&#39;, 11211);
$memcache->set(&#39;mem_key&#39;, &#39;Hello Memcache!&#39;, 0, 180);
$val = $memcache->get(&#39;mem_key&#39;);
echo $val;
?>
Copy after login

Recommended study: " PHP video tutorial

The above is the detailed content of How to install memcache in php 5.3.10. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template