xampp启动Apache报错 1、Error: Apache shutdown unexpectedly. 2、Unclean shutdown of previous Apache run?

报错信息

Error: Apache shutdown unexpectedly.

Unclean shutdown of previous Apache run?
PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0

报错信息:

16:50:26  [Apache]     Error: Apache shutdown unexpectedly.
16:50:26  [Apache]     This may be due to a blocked port, missing dependencies,
16:50:26  [Apache]     improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]     Press the Logs button to view error logs and check
16:50:26  [Apache]     the Windows Event Viewer for more clues
16:50:26  [Apache]     If you need more help, copy and post this
16:50:26  [Apache]     entire log window on the forums

查看错误日志:

Unclean shutdown of previous Apache run? PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0


 

尝试多种办法,最终找到两种常规解决方案并做如下记录。

解决1:

80端口和443端口被占用;

1、修改配置文件Apache(httpd.conf)

将端口号 80 修改为 【其他的】,尽量不要使用0-1023端口,是系统保留端口

修改两处

2、修改配置文件Apache(httpd-ssl.conf)

将端口号 443 修改为 【其他的】,尽量不要使用0-1023端口,是系统保留端口

修改如下

重启,尝试启动Apache

解决2:

更新:Visual Studio 2019的Microsoft Visual c++ 版本

下载地址:https://visualstudio.microsoft.com/zh-hans/downloads/

打开链接后,打开“其他工具和框架”,然后下载:Microsoft Visual C++ Redistributable for Visual Studio 2019

然后安装

安装后,重启电脑

启动Apache

成功。

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值