LNMP启用fileinfo扩展

进入LNMP目录

cd /root/lnmp1.x/src

解压PHP压缩包

tar zxf php-x.x.x.tar.gz

进入fileinfo扩展目录

cd php-x.x.x/ext/fileinfo

执行命令

/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-fileinfo
make && make install

修改php.ini

vim /usr/local/php/etc/php.ini

添加一行

extension=fileinfo.so

重启php-fpm

service php-fpm restart

Leave a comment

Your email address will not be published. Required fields are marked *