Upgrade PHP to version 7.2 in Windows 10
1. URL:https://windows.php.net/download#php-7.2, download vc15 x64 thread safe, as shown in Figure 1
2. VC15 version needs to install Visual Studio 2017 x64 or x86 Visual C++ Redistributable, download and install Microsoft Visual C++ Redistributable for Visual Studio 2017, as shown in Figure 2
3. Copy php-7.2.14-win32-vc15-x64 to C:\php-7.2.14
4. Edit environment variables: C:\php-7.1.12, modified to C:\php-7.2.14
5. Copy php.ini-development to php.ini, configure php, modify the configuration information in php.ini, the content that needs to be configured includes the following parts
(1) Find
; extension_dir = “ext”
Modified to:
extension_dir = “c:/php-7.2.14/ext”
(2) Modify the configuration information so that PHP can directly call other modules, and find similar to
;extension=
The way to load the module is to remove the semicolon (;) in front of the module to be loaded. For example, if you want to use the mysql module, you must remove the semicolon before ;extension=php_mysql.dll.
;extension=bz2
;extension=curl
;extension=fileinfo
;extension=gd2
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=interbase
;extension=ldap
;extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
;extension=sockets
;extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xsl
Modified to:
extension=bz2
extension=curl
extension=fileinfo
extension=gd2
;extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
extension=sockets
;extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xsl
6. URL:https://windows.php.net/downloads/pecl/snaps/redis/, download php_redis-3.1.4-7.2-ts-vc15-x64.zip, copy to c:\php-7.2.14\ext\php_redis.dll to php Support Redis, as shown in Figure 3
7. Add the support of Redis extension in php.ini, as shown in Figure 4
extension=redis
8. Configure the session function of PHP
When using the session function, we must configure the save directory of the session file on the server, otherwise we cannot use the session, we need to create a new readable directory folder on windows 10, this directory is preferably independent of the web In addition to the main program directory, here I have created the phpsessiontmp directory on the root directory of the E disk, and then finds it in the php.ini configuration file
;session.save_path = “/tmp”
Modified to:
session.save_path = “e:/phpsessiontmp”
9. Configure the file upload function of PHP
Like session, when using the PHP file upload function, we must specify a temporary folder to complete the file upload function, otherwise the file upload function will fail, and we still need to Create a readable and write directory folder on the root directory of the E disk, and then find it in the php.ini configuration file
;upload_tmp_dir =
Modified to:
upload_tmp_dir = “e:/phpuploadtmp”
10. Modify date.timezone, find
;date.timezone =
Modified to:
Date.TimeZone = “Asia/Shanghai”



