Data-id= "1190000005058875" data-license= "CC" >
Build and install FileInfo extensions under Centos
0.why complie FileInfo Extension
Today, a colleague to do the function, found that PHP was installed when the FileInfo extension is not compiled
However, the use of Pecl install does not find the. m4 file and other trivial installation failure issues.
So it's OK to use Phpize to install the extension.
1. Check the current environment
php -i|grep fileinfo
If it appears
fileinfo
fileinfo support => enabled
is available on behalf fileinfo
of the extension, otherwise unavailable.
2. Installation
2-1: Download
wget -O php-5.6.9.tar.gz http://cn2.php.net/get/php-5.6.9.tar.gz/from/this/mirror
2-2: Unzip
tar -zxvf php-5.6.9.tar.gz
2-3: Go to the corresponding PHP version extension directory (I this is 5.6.9 version)
cd /var/php5.6.9/php-5.6.9/ext/fileinfo
2-4: Compile && Install
/usr/local/php/bin/phpize./configure -with-php-c/local/php/bin/php-configmake && make installvim /usr/local/php/etc/php.ini
2-5: Modify PHP.ini
Join:extension=fileinfo.so
Need this article to help you
The above describes the CentOS under the PHP compiler installation FileInfo extension, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.