Linux下安装php的扩展文件fileinfo.so文件
1.首先检查系统是否已经安装
- [root@iZbp1dwql3ymcem09rfdchZ ~]# php -i|grep fileinfo
- Configure 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"
- fileinfo
- fileinfo 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.重启服务器
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇: 在apache下将php5转成php7
- 下一篇:没有了