php7.1.17 practice of php5.6.25 Upgrade in WAMP environment
This article refers to: https://www.cnblogs.com/hubaohua1588/p/6884146.html to operate.
1. Download a php7.1.17 from the official website, address http://windows.php.net/download/
2. Unzip the compressed package that you just downloaded, and modify the name php7.1.17, which is the php+ version number.
3. Place the folder in the wamp/bin/php directory.
4. Copy the original version of the php5.6.25 folder, PHP.ini, Phpforapache.ini, wampserver.conf files to the php7.1.17 folder.
5. Modify PHP.ini, Phpforapache.ini two files, replace all php5.6.25 in two files with php7.1.17.
6. In the newly modified Phpforapache.ini file, there is a need to download the file,
Zend_extension = "C:/wamp64/bin/php/php7.1.17/zend_ext/php_xdebug-2.4.1-5.6-vc11-x86_64.dll"
This Zend_ext directory and this DLL file are non-existent, need to download, download link https://xdebug.org/download.php,
For example, download a php_xdebug-2.6.0-7.0-vc14-x86_64.dll file, note that you do not select the NTS file, and modify the code to read as follows:
Zend_extension = "C:/wamp64/bin/php/php7.1.17/zend_ext/php_xdebug-2.6.0-7.0-vc14-x86_64.dll"
6. Modify the wampserver.conf file, if your Apache version is 2.2X then modify
$phpConf [' Apache '] [' 2.2 '] [' loadmodulename '] = ' php5_module '; $phpConf [' Apache '] [' 2.2 '] [' loadmodulefile '] = ' Php5apache2_2.dll ';
For
$phpConf [' Apache '] [' 2.2 '] [' loadmodulename '] = ' php7_module '; $phpConf [' Apache '] [' 2.2 '] [' loadmodulefile '] = ' Php7apache2_2.dll ';
If your Apache version is 2.4 then modify
$phpConf [' Apache '] [' 2.4 '] [' loadmodulename '] = ' php5_module '; $phpConf [' Apache '] [' 2.4 '] [' loadmodulefile '] = ' Php5apache2_4.dll ';
For
$phpConf [' Apache '] [' 2.4 '] [' loadmodulename '] = ' php7_module '; $phpConf [' Apache '] [' 2.4 '] [' loadmodulefile '] = ' Php7apache2_4.dll ';
7. In the Wamp/bin/apache/apache2.4.23/bin directory, locate the php.ini file, delete it, and the replacement version will be generated automatically.
8. Under the wamp/bin/apache/apache2.4.23/conf directory, locate the httpd.conf file
Look for the loadmodule and change it to.
LoadModule php7_module "D:/wamp/bin/php/php7.1.17/php7apache2_4.dll"
In this step, after Wamp left-click->php->version-> in the Version list php7.1.17, the httpd.conf file is changed automatically, or it can be modified without manual modification.
9. Finally, in the php.ini file, comment out this sentence
; Extension=php_mysql.dll
10. Restarting the Wamp is possible.
WAMP Local Environment Upgrade PHP version-second attempt