XXXXX
C/C++
XXXXX
C#/.net
XXXXX
js
java
java
开发导航 开发导航 www.endv.cn
天云

C:\php-7.4.5-nts-Win32-vc15-x64\php-cgi.exe - FastCGI 进程意外退出 问题解决 PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unk

win10两台电脑,一台装了vs2019 iis 正常,另一台没装iisphp环境出现些故障,深查原因,出现如下警告,现代码部分

PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unk

访问IIS 站点报错:

HTTP 错误 500.0 - Internal Server Error

C:\php-7.4.5-nts-Win32-vc15-x64\php-cgi.exe - FastCGI 进程意外退出

安装PHP7.4以上版本时,在运行PHP时会提示如下:

 1、进入php程序目录

 2、输入 php -v就会有以警告

 1 Microsoft Windows [版本 10.0.18363.836]
 2 (c) 2019 Microsoft Corporation。保留所有权利。
 3 
 4 C:\Users\llskj>cd C:\php-7.4.5-nts-Win32-vc15-x64
 5 
 6 C:\php-7.4.5-nts-Win32-vc15-x64>php -v
 7 PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0   // 出现了这个警告,
 8 
 9 C:\php-7.4.5-nts-Win32-vc15-x64>php -v                                            // 安装下面的vc库 后 再运行 php -v 命令
10 PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )      //显示正常了
11 Copyright (c) The PHP Group
12 Zend Engine v3.4.0, Copyright (c) Zend Technologies
13 
14 C:\php-7.4.5-nts-Win32-vc15-x64>

 

原因 : php不能加载扩展库文件,当然会报错 

3、解决办法:下载安装Visual C++ 可再发行软件包。 ,重起iis服务


php7.4的安装和配置跟之前没有分别,唯一要注意的一点是它的编译已经从vc++15 变成了vc++16,它的安装包命名也变成了vs16(visualstudio 16,即vs 2019)
直接下载个全的:
Visual Studio 2015、2017 和 2019
下载之后安装,重起IIS服务或重启电脑,就OK 

 

posted @ 2020-05-29 01:41  Endv  阅读(735)  评论(0编辑  收藏  举报