fileinfo is integrated into the source code for the project php ( https://pecl.php.net/package/Fileinfo )
// ------ wdlinux in php -------------------------------------- -------------
cd /www/wdlinux/phps/56/include/php/ext/Fileinfo-1.0.4
If you do not install php-devel, next steps will prompt phpize error, so the first fitted
yum install php-devel
Gets packed phpize path
which phpize
Phpize executed in ext / fileinfo directory
/usr/bin/phpize
Compile fileinfo
./configure --with-php-config=/www/wdlinux/phps/56/bin/php-config
make && make install
// ----- own installed php --------------------------------------- ---------------
tar -zxvf php-7.1.0.tar.gz
cd php-7.1.0/ext/fileinfo
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-fileinfo
make && make install
echo 'extension="fileinfo.so"' >> /usr/local/php/etc/php.ini
service php-fpm restart
php -i | grep fileinfo
......
fileinfo
fileinfo support => enabled