search
HomeBackend DevelopmentPHP Problemhow to install php extension

how to install php extension

Aug 29, 2019 pm 01:39 PM
phpInstallExpand

how to install php extension

1. Install php extension on windows

1. Download

http://pecl.php.net/Yes The official extension library, where we can download the extensions we want.

how to install php extension

Related recommendations: "PHP Getting Started Tutorial"

2. Select the version

has installed redis as an example :

how to install php extensionhow to install php extension

Click the how to install php extension

button to enter the windows download interface

how to install php extension

When installing the PHP extension for Windows, you need to pay attention to the version selection: PHP version, whether it is linear security, and the number of operating systems.

3. Installation

Extract the downloaded compressed package, then put the php_redis.dll inside into the folder specified in php.ini, load the redis module, and then restart server.

how to install php extension

2. Install php extension on linux

1.yum or apt-get installation

how to install php extension

2. Use pecl to install

1), pecl install to install

~# pecl install memcached

downloading memcached-2.2.0.tgz .. .

Starting to download memcached-2.2.0.tgz (70,449 bytes)....

2), configure php.ini

By running php --ini Find the location of the php.ini file, and then add extension=memcached.so

3.phpize installation - taking redis as an example

1), download the php extension package

[root@localhost ~]# wget http://pecl.php.net/get/redis-4.0.0.tgz

2), decompress and enter the expansion package directory

[root@localhost ~]# tar -xzvvf redis-4.0.0.tgz

[root@localhost redis-4.0.0]# cd redis-4.0.0

3), Execute phpize

[root@localhost redis-4.0.0]# phpize

4), ./configure

[root@localhost redis-4.0.0]#. /configure --with-php-config=/usr/bin/php-config

5), make && make install

[root@localhost redis-4.0.0]# make && make install

6), configure php.ini

extension=redis.so

4. Direct installation (similar to windows)

Direct download will download For a good compressed package, after decompression, put the file with .so suffix directly into the specified path, and then configure the php.ini file.

The above is the detailed content of how to install php extension. 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

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.