centos安装php缺失fileinfo.so扩展解决

来源:互联网 发布:js农历转公历 编辑:程序博客网 时间:2024/05/16 12:09

1.首先检查系统是否已经安装

[root@iZbp1dwql3ymcem09rfdchZ ~]# php -i|grep fileinfoConfigure Command =>  './configure'  '--prefix=/alidata/server/php' '--enable-opcache' '--with-config-file-path=/alidata/server/php/etc' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-fpm' '--enable-fastcgi' '--enable-static' '--enable-inline-optimization' '--enable-sockets' '--enable-wddx' '--enable-zip' '--enable-calendar' '--enable-bcmath' '--enable-soap' '--with-zlib' '--with-iconv' '--with-gd' '--with-xmlrpc' '--enable-mbstring' '--without-sqlite' '--with-curl' '--enable-ftp' '--with-mcrypt' '--with-freetype-dir=/usr/local/freetype.2.1.10' '--with-jpeg-dir=/usr/local/jpeg.6' '--with-png-dir=/usr/local/libpng.1.2.50' '--disable-ipv6' '--disable-debug' '--with-openssl' '--disable-maintainer-zts' '--disable-safe-mode' '--disable-fileinfo'fileinfofileinfo support => enabled

如果出现上面说明已经安装


2.执行下载包含fileinfo扩展的php安装包命令,也可以独立下载fileinfo编译安装包

wget -O php-5.6.9.tar.gz http://cn2.php.net/get/php-5.6.9.tar.gz/from/this/mirror


3.解压

tar -zxvf php-5.6.9.tar.gz


4.当前目录解压完,进入下面目录 

cd php-5.6.9/ext/fileinfo/


5.在之前已经编译安装的的php的bin目录中找到命令phpize执行生成.configure文件

本人已安装php的目录命令:/alidata/server/php-5.5.7/bin/phpize

6.配置、编译安装

 ./configure -with-php-config=/alidata/server/php-5.5.7/bin/php-config

make && make install


7.修改php.ini
加入:extension=fileinfo.so

8.重启服务器,完成


0 0
原创粉丝点击