There is no problem not worth solving, and no technology not worth learning!

Upgrade PHP to version 8.1 in Windows 10

查看 phpinfo

1. Reference:Upgrade PHP to version 7.2 in Windows 10  .Download VS16 x64 Thread Safe, as shown in Figure 1

参考:在 Windows 10 中升级 PHP 至版本 7.2 。https://www.shuijingwanwq.com/2019/01/24/3139/ 。网址:https://windows.php.net/download#php-8.1 ,下载 VS16 x64 Thread Safe
Figure 1

2. The VC16 x64 version needs to install Visual Studio 2019 x64 Visual C++ Redistributable,Download and install Microsoft Visual C++ Redistributable for Visual Studio 2019 . The latest supported downloads for Microsoft Visual C++ redistributable packages. as shown in Figure 2

VC16 x64 版本需要安装 Visual Studio 2019 x64 的 Visual C ++ Redistributable,下载并安装 Microsoft Visual C++ Redistributable for Visual Studio 2019,参考:https://learn.microsoft.com/zh-cn/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022 。Microsoft Visual C++ 可再发行程序包最新支持的下载
Figure 2

3. Microsoft Visual C++ 2015-2022 Redistributable (x64) – 14.38.33130 is installed. as shown in Figure 3

Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.38.33130 已安装
Figure 3

4. Copy php-8.1.27-win32-vs16-x64 to C:\php-8.1.27.

5. Edit the system environment variables: C:\php-7.4.27, and modify it to C:\php-8.1.27. as shown in Figure 4

编辑系统环境变量:C:\php-7.4.27,修改为 C:\php-8.1.27
Figure 4

6. Copy php.ini-development to php.ini, configure php, and modify the configuration information in php.ini. The content that needs to be configured includes the following parts, where extend= is set on demand.


;extension_dir = "ext"
extension_dir = "C:/php-8.1.27/ext"

extension=curl
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gd
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;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=oci8_19  ; Use with Oracle Database 19 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
	
extension=redis

;session.save_path = "/tmp"
session.save_path = "E:/phpsessiontmp"

;upload_tmp_dir =
upload_tmp_dir = "E:/phpuploadtmp"

;date.timezone =
date.timezone = "Asia/Shanghai"


7,Download php_redis-5.3.5rc1-8.1-ts-vs16-x64.zip, copy to C:\php-8.1.27\ext\php_redis.dll to support redis in PHP, as shown in Figure 5

网址:https://windows.php.net/downloads/pecl/snaps/redis/ ,下载 php_redis-5.3.5rc1-8.1-ts-vs16-x64.zip,复制至 C:\php-8.1.27\ext\php_redis.dll,以在 PHP 中支持 Redis
Figure 5

8. Check phpinfo. as shown in Figure 6

查看 phpinfo
Figure 6

Need long-term technical maintenance or remote troubleshooting?

I am a PHP / Go backend engineer with 15+ years of experience, focused on existing system maintenance, bug fixing, performance optimization, server troubleshooting, WordPress maintenance, and small feature iterations.

If your project is facing any of the following issues, we can start with a small troubleshooting task first:

  • ✅ PHP / Laravel / Yii2 legacy systems without active maintenance
  • ✅ Go / Gin backend APIs that need troubleshooting or optimization
  • ✅ Slow, broken, or unstable WordPress websites
  • ✅ Nginx / MySQL / Redis / Linux server issues
  • ✅ CDN / Cloudflare / DNS / HTTPS configuration problems
  • ✅ Long-term remote technical support or part-time maintenance

More details: About Me & Collaboration

WeChat: 13980074657
Email: shuijingwanwq@gmail.com
Telegram: @shuijingwan
GitHub: https://github.com/shuijingwan

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.