Home > Backend Development > PHP Tutorial > How to upgrade php version

How to upgrade php version

清浅
Release: 2023-04-06 13:58:01
Original
33219 people have browsed it

Steps to upgrade the php version: First download the version to be upgraded and put it under the php file under wamp, copy the old version [php.in] and other files to the new version and modify them; then modify apache Wait for the file; finally restart wamp.

How to upgrade php version

Steps to upgrade php version:

1. Download a php7.1.5

## from the official website #2. Unzip the compressed package you just downloaded and change the name to php7.1.5, which is the php version number.

3. Place this folder in the wamp/bin/php directory.

4. Copy the php.ini, phpForApache.ini, and wampserver.conf files in the original version of the php5.5.12 folder to the php7.1.5 folder.

5. Modify the two files php.ini and phpForApache.ini, and replace all php5.5.12 in the two files with php7.1.5.

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';
Copy after login

to

$phpConf['apache']['2.2']['LoadModuleName'] = 'php7_module';
$phpConf['apache']['2.2']['LoadModuleFile'] = 'php7apache2_2.dll';
Copy after login

If your apache version is 2.4, then modify

$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
Copy after login

is

$phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll';
Copy after login

7. Find the php.ini file in the wamp/bin/apache/apache2.4.9/bin directory and delete it.

8. In the wamp/bin/apache/apache2.4.9/conf directory, find the httpd.conf file, search for LoadModule, and change it to

LoadModule php7_module "D:/wamp/bin/php/php7.1.5/php7apache2_4.dll"
Copy after login

9. Download a php_xdebug-2.5. 3-7.1-vc14-x86_64.dll dynamic link library, link https://xdebug.org/download.php

In the wamp/bin/php/php7.1.5 folder, create a new folder zend_ext , put the downloaded dynamic link library into the zend_ext folder.

10. In the wamp/bin/php/php7.1.5 folder, find the php.ini file

; XDEBUG Extension
zend_extension = "D:/wamp/bin/php/php7.1.5/zend_ext/php_xdebug-2.5.3-7.1-vc14-x86_64.dll";
Copy after login

11. Finally, comment out this sentence in the php.ini file

;extension=php_mysql.dll
Copy after login

12. Restart wamp.

The above is the detailed content of How to upgrade php version. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template