centos安装php缺失fileinfo.so扩展解决
Configure Command => './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-config-file-scan-dir=/usr/local/php/etc/php.d' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-fpm' '--enable-opcache' '--disable-fileinfo' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir=/usr/local' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-exif' '--enable-sysvsem' '--with-curl' '--enable-mbregex' '--enable-inline-optimization' '--enable-mbstring' '--with-mcrypt' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-ftp' '--enable-intl' '--with-xsl' '--with-gettext' '--enable-zip' '--enable-soap' '--disable-ipv6' '--disable-debug'
我的出现这个说明没有安装好
如果出现以下说明安装好了:
2.执行下载包含fileinfo扩展的php安装包命令,也可以独立下载fileinfo编译安装包
wget -O php-5.5.35.tar.gz http://cn2.php.net/get/php-5.5.35.tar.gz/from/this/mirror
3.解压
tar -zxvf php-5.5.35.tar.gz
4.当前目录解压完,进入下面目录
cd php-5.5.35/ext/fileinfo/
5.在之前已经编译安装的的php的bin目录中找到命令phpize执行生成.configure文件
本人已安装php的目录命令:
/usr/local/php/bin/phpize
6.配置、编译安装
./configure -with-php-config=/usr/local/php/bin/php-config
make && make install
7.修改php.ini
加入:extension=fileinfo.so
8.重启服务器,完成
service php-fpm restart