Linux to install PHP extensions file fileinfo.so file ____linux

Source: Internet
Author: User
Tags install php

1. First check to see if the system is installed

[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  
If the above instructions have been installed


2. Download the PHP installation package command that contains FileInfo extensions, or download FileInfo to compile the package separately

Wget-o php-5.6.9.tar.gz Http://cn2.php.net/get/php-5.6.9.tar.gz/from/this/mirror


3. Decompression

TAR-ZXVF php-5.6.9.tar.gz


4. After the current directory is extracted, enter the following directory

CD php-5.6.9/ext/fileinfo/


5. Locate the command Phpize execute the build. Configure file in the bin directory of the previously compiled and installed PHP

I have installed the PHP directory command:/alidata/server/php-5.5.7/bin/phpize

6. Configure, compile and install

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

Make && make install


7. Modify PHP.ini
Add: extension=fileinfo.so

8. Reboot the server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.