PhpStudy环境下,切换PHP8.0.2版本,发现网站打不开,变成502 bad gateway
但是静态网页是能打开的,就是PHP程序打不开
解决办法:
直接cmd到D:\phpstudy_pro\Extensions\php\php8.0.2nts这个位置执行php -v
如果发现出现以下错误PHP Warning: 'C:\Windows\SYSTEM32\VCRUNTIME140.dll' 14.0 is not compatible with this PHP build linked with 14.28 in Unknown on line 0
进入到这个网址/u30882/rx39g7/kns2a2,咔咔已经将软件下载下来了,点击进去直接下载即可。
官网下载网址:下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux
下载运行。搞定
下载:VC_redist.x64
或者直接下载
Microsoft Visual C++ Redistributable
x86: https://aka.ms/vs/16/release/VC_redist.x86.exe
x64: https://aka.ms/vs/16/release/VC_redist.x64.exe
Microsoft Visual C++ Redistributable
x86: /fwlink/?LinkId=746571
x64: /fwlink/?LinkId=746572
Microsoft Visual C++ Redistributable
x86+x64: /en-pk/download/details.aspx?id=48145
x86+x64 update3: /en-us/download/details.aspx?id=53587
Microsoft Visual C++ Redistributable
x86+x64 in all Language: /en-us/help/4032938/update-for-visual-c--redistributable-package
Microsoft Visual C++ Redistributable
x86+x64 in all Language: /Downloads?pid=1452
Microsoft Visual C++ Redistributable
x86-sp1: /en-pk/download/details.aspx?id=8328
x86-sp1-MFC-sec-update: /en-us/download/details.aspx?id=26999