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

Some common PHP extension installation methods

Release: 2023-04-08 13:30:01
forward
3364 people have browsed it

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
Copy after login

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
Copy after login

Finally modify php.ini The file

extension = "msgpack.so"
Copy after login

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
Copy after login

Common errors

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

is a missing library file

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

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
Copy after login

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
Copy after login

#Finally modify the php.ini file

extension = "intl.so"
Copy after login

Related recommendations:

PHP video tutorial: //m.sbmmt.com/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!

Related labels:
php
source:oschina.net
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