Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install fileinfo extension in php

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about how to install the fileinfo extension in php. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

1. Check if dependencies have been installed

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 has been integrated into the source code of the php project (https://pecl.php.net/package/Fileinfo), download the installation package and decompress it.

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. Execute the command phpize to generate the configure file

/ usr/local/php/bin/phpize

4. Configure, compile, install

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

Make & & make install

5. Append the corresponding configuration to php.ini

Add echo "extension=" fileinfo.so "> > / usr/local/php/etc/php.ini

After reading the above, do you have any further understanding of how to install fileinfo extensions in php? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report