Home  >  Article  >  Backend Development  >  Some common PHP extension installation methods

Some common PHP extension installation methods

尚
forward
2020-03-21 09:33:453304browse

Some common PHP extension installation methods

fileinfo

1. The downloaded php version comes with

cd /path/php/ext/fileinfo
phpize
./configure --with-php-config=/path/php/bin/php-config
make
make install

2. Search at peclphp.net/ Download and install

msgpack

Search for download and installation at peclphp.net/ Note: Is the version suitable for the version of php

wget "http://pecl.php.net/get/msgpack-0.5.7.tgz"
tar zxf msgpack-0.5.7.tgz
cd msgpack-0.5.7
/usr/local/php/bin/phpize
./configure --with-msgpack
make
make install

Finally modify php.ini The file

extension = "msgpack.so"

imap php installation package contains

Installation dependency package

yum install -y libc-client-* 
cd /path/php/ext/fileinfo
phpize
./configure --with-php-config=/path/php/bin/php-config --with-kerberos --with-imap-ssl
make
make install

Common errors

configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

is a missing library file

ll /usr/lib64/libc-client.so
 ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so

Then compile and install

intl extension

You should install ICU before installation

ICU official website: http://www.icu-project.org /

Download address: http://download.icu-project.org/files/icu4c/49.1.2/icu4c-49_1_2-src.tgz

PHP intl: http:// pecl.php.net/package/intl

Install ICU

tar zxf icu4c-49_1_2-src.tgz
cd /path/icu/source
./configure --prefix=/usr/local/icu
make && make install

Install intl extension

cd /path/php/ext/intl
phpize
./configure --enable-intl --with-icu-dir=/usr/local/icu/ --with-php-config=/usr/local/php5/bin/php-config
make
make install

#Finally modify the php.ini file

extension = "intl.so"

Related recommendations:

PHP video tutorial: https://www.php.cn/course/list/29/type/2.html

The above is the detailed content of Some common PHP extension installation methods. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:oschina.net. If there is any infringement, please contact admin@php.cn delete