报错信息
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
成功。