How does php7 install the mysql extension?
Today, I will talk to you about how to install the mysql extension on php7. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Php7 install mysql extension method: 1, download mysql extension; 2, execute "tar zxvf mysql.tar.gz"; 3, enter the directory after decompression; 4, add mysql extension to the configuration file in php.
This article operating environment: Windows7 system, PHP7, Dell G3 computer.
How does php7 install the mysql extension?
PHP7 completely removes Mysql extension support, and the original mysql_* series functions will no longer be supported in mysql. Cause the old project to report an error, now install the extension back and record it.
1. First download the mysql extension (http://git.php.net/?p=pecl/database/mysql.git))
two。 Decompression
Tar zxvf mysql.tar.gz
3. Cd enters the decompressed directory
Phpize./configuremake
A mysql.so file is generated in the modules directory.
4. Add mysql extension to php configuration file
# first print out phpinfo (), and add a line to Loaded Configuration File / etc/php/7.1/fpm/php.inisudo vim / etc/php/7.1/fpm/php.ini# in the configuration file of php to restart php-fpmsudo / etc/init.d/php7.1-fpm restart. After reading the above, do you have any further understanding of how php7 installs the mysql extension? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.