How php installs fileinfo extensions
This article mainly explains "php how to install fileinfo extension", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "php how to install fileinfo extension" bar!
This article operating environment: centos 7, php 7. 1, thinkpad T480 computer.
Here are the specific steps for php to install the fileinfo extension:
The first step is to find the phpize directory, usually in the php directory where you installed it. Mine is in / usr/local/php/bin/phpize.
The second step is to find the source directory of the php you installed. I used to install the php environment with the oneinstack button; so I unzipped it in the / home/package/oneinstack/src/ directory
Tar-zxvf php-5.6.31.tar.gz
Step 3: go to the php directory / ext/fileinfo/
Step 4: execute / usr/local/php/bin/phpize to generate configure file [reason can be found]
Step 5. / configure-- with-php-config=/usr/local/php/bin/php-config [/ usr/local/php/bin/ is your own php directory]
Step six
Make & & make install
Step 7 / usr/local/php/etc/php.ini add extension: extension=fileinfo.so
Step 8 restart nginx and php-fpm. At this time, fileinfo will also appear in the phpfinfo message.
Thank you for reading, the above is the content of "php how to install fileinfo extension", after the study of this article, I believe you have a deeper understanding of how to install fileinfo extension on php, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!