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 the fileinfo extension for php7

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to install the fileinfo extension in php7. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Php7 install fileinfo extension method: 1, download and install php7;2, enter the PHP7 installation directory, open the configuration file "php.ini"; 3, in the configuration file, add "extension=fileinfo.so;" code, and save the file; 4, restart php.

The operating environment of this tutorial: CentOS 6 system, PHP7.1 version, Dell G3 computer.

First, make sure to install php7, and if not, install it:

Download the php7 source code

Wget https://www.php.net/distributions/php-7.3.9.tar.bz2

Decompression

Tar-xvf php-7.3.9.tar.bz2cd php-7.3.9/ext/fileinfo/

Compilation start

Phpize./configure-- with-php-config=/usr/local/php/bin/php-config / / Note-- the directory where the with-php-config= php-config file is located / / if you don't know-- the with-php-config directory can get whereis php-configsudo make & & sudo make install with the following command

Install the fileinfo extension

Modify the php.ini file

/ / regardless of whether the file exists or does not exist, sudo vi / usr/local/php/etc/php.ini / / write the sentence extension=fileinfo.so

Then restart php

Verify that the installation is successful

Enter the following command to test whether the installation is successful

Php-m | grep 'file' / / fileinfo indicates success after execution

On how to install php7 fileinfo extension to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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

Development

Wechat

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

12
Report