PHP compiler installation FileInfo extension under Centos

Source: Internet
Author: User
Tags php compiler
Data-id= "1190000005058875" data-license= "CC" >

Build and install FileInfo extensions under Centos

0.why complie FileInfo Extension

Today, a colleague to do the function, found that PHP was installed when the FileInfo extension is not compiled

However, the use of Pecl install does not find the. m4 file and other trivial installation failure issues.
So it's OK to use Phpize to install the extension.

1. Check the current environment

php -i|grep fileinfo
If it appears
fileinfo
fileinfo support => enabled
is available on behalf fileinfo of the extension, otherwise unavailable.

2. Installation

2-1: Download

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

2-2: Unzip

tar -zxvf php-5.6.9.tar.gz

2-3: Go to the corresponding PHP version extension directory (I this is 5.6.9 version)

cd /var/php5.6.9/php-5.6.9/ext/fileinfo

2-4: Compile && Install

/usr/local/php/bin/phpize./configure -with-php-c/local/php/bin/php-configmake && make installvim /usr/local/php/etc/php.ini

2-5: Modify PHP.ini

Join:extension=fileinfo.so

Need this article to help you

The above describes the CentOS under the PHP compiler installation FileInfo extension, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.