Install fileinfo extensions to PHP7.0 on CentOs

Time:2019-10-23

Because the construction of the project is in a preliminary stage, it is inevitable that a series of problems occurred due to the immaturity of the environment. In the procedure of file operation, an error of lack of expansion was reported, which has been solved

Have a look at the instructions given official, http://php.net/manual/zh/book…

Solving steps

First: first find the location of PHP installation source code, I downloaded to /usr/local/src directory

Install fileinfo extensions to PHP7.0 on CentOs
Once you’ve determined where the PHP source package is installed, go to the fileinfo directory under ext

cd /usr/local/src/php-7.0.23/ext/fileinfo/

The second: find phpize directory (about phpize is what east east, the official http://php.net/manual/en/inst… )

Usually in the bin directory under the PHP directory, my environment is in /usr/local/php/bin directory

/usr/local/php/bin    

Without leaving the ext/fileinfo directory of the PHP installation source, execute the following command

/usr/local/php/bin/phpize

return

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012

Third: execute orders

./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

Return the following command line to indicate that the installation was successful

Build complete.
Don't forget to run 'make test'.
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

Fourth: find the phpini location and open the extension for phpini

Install fileinfo extensions to PHP7.0 on CentOs

Finally, restart apache, refresh phpinfo, and see the big eight letters fileinfo, O(∩_∩)O

Recommended Today

Introduction and overview of NoSQL

1.1 INTRODUCTION1.1.1 1 under the background of Internet era, why do you use nosql1 single machine MySQL In the 1990s, the number of visitors to a website was generally small, and it could be easily handled with a single database. At that time, there were more static web pages and less dynamic interactive websites. Under […]