Home >Backend Development >PHP Problem >How to install memcache extension in php

How to install memcache extension in php

王林
王林Original
2020-04-25 13:32:092089browse

How to install memcache extension in php

1. Download and decompress

wget http://pecl.php.net/get/memcache-2.2.7.tgz
tar zxvf memcache-2.2.7.tgz

2. Compile

Choose to use phpize and php-config according to the actual situation.

[root@www memcache-2.2.7]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:     20131106
Zend Module Api No:   20131226
Zend Extension Api No:  220131226
[root@www memcache-2.2.7]# ./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config

3. Installation

[root@www memcache-2.2.7]# make install
Installing shared extensions:   /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

4. Modify php.ini and restart php-fpm

extension=memcache.so

For more related tutorials, please pay attention to php中文网 .

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

Statement:
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