php安装fileinfo扩展

1.检查是否已经安装依赖

php -i|grep fileinfo

Configure Command => './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--with-mcrypt' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-opcache'

fileinfo

fileinfo support => enabled

 

2. fileinfo已集成至php项目源代码内(https://pecl.php.net/package/Fileinfo) ,下载安装包,解压

cd /usr/local/src

wget -O php-.7.1.0 .tar.gz http://cn2.php.net/distributions/php-7.1.0.tar.gz

tar -zxvf php-7.1.0.tar.gz

cd php-7.1.0/ext/fileinfo/

 

3.执行命令phpize生成configure文件

/usr/local/php/bin/phpize

 

4.配置、编译、安装

./configure -with-php-config=/usr/local/php/bin/php-config

make && make install

 

5.追加对应配置至php.ini

加入echo "extension=“fileinfo.so”" >>/usr/local/php/etc/php.ini

 

转载于:https://my.oschina.net/HeAlvin/blog/3075963

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值