search
HomeBackend DevelopmentPHP ProblemHow to install memcache extension in php

How to install the memcache extension in php: 1. Download the extension compressed package; 2. Unzip the compressed package; 3. Recompile; 4. Copy the memcache.so file to the corresponding directory; 5. In the configuration file Add extensions; 6. Restart php-fpm.

How to install memcache extension in php

Installation method:

(Recommended tutorial: php graphic tutorial)

1. Download the extension source code

Download the memcache version that suits you. This time, choose version 3.0.8

2. Unzip the download package

tar -zxvf memcached-3.0.8.tgzcd memcached-3.0.8

3. Recompile

phpize && ./configure --enable-memcache --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11 && make

4. Copy the memcache.so file to the corresponding directory:

cd modules/cp memcache.so /usr/local/opt/php55-memcache/

(Learning video recommendation: php video tutorial)

5. In php.ini Add configuration to the file:

extension=/usr/local/opt/php55-memcache/memcache.so

6. Restart php-fpm

pkill php/usr/local/sbin/php-fpm &

7. If you see the following configuration in phpinfo(), it is successful:

How to install memcache extension in 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment