首页 > 解决方案 > Windows 10 XAMPP Apache 意外关闭

问题描述

我有一些项目在我的计算机上运行 XAMPP 并在 Windows 10 上运行。过去 3 到 4 个月我一直在使用 XAMPP,完全没有问题,但是昨天在 Windows 更新后突然,它不会打开 Apache服务器说:

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

我一直无法找到解决方案,我尝试了很多我可以在网上找到的东西,所以请有人可以帮助我吗?

编辑**自从发生这种情况以来,我已经重新启动了我的电脑几次,但没有任何改变!但是我在发帖时忘了说 MySQL 服务器像以前一样运行!然而,Apache 服务器没有。

编辑 2** 我尝试了很多东西,例如卸载 XAMPP 并重新安装,直接从 CMD 运行 Apache 以检查任何错误(没有显示),更改了 Apache 的端口配置,即使端口 80 似乎正在监听,我也尝试安装其他类似 XAMPP 的程序(如 MAMP、WAMP),但没有真正出现,也没有类似 XAMPP 的程序有效!有没有人有什么建议?另外,奇怪的是,XAMPP 在我的第二台 PC(Windows 7)上完美运行,就像以前一样,但我希望它在这台 PC 上,因为我在这里进行开发(另一台又旧又慢)。此外,现在 XAMPP 似乎不会在它的控制台中抛出“红线错误”,它只是说:

[Apache]    Attempting to start Apache service...

它似乎没有改变。这只发生在我以管理员 XAMPP 运行时!

标签: apachexamppport

解决方案


我在挖掘我的日志/错误文件后找到了解决方案,这就是显示的内容;

 www.example.com:443:0 server certificate does NOT include an ID which matches the server name
 pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
 www.example.com:443:0 server certificate does NOT include an ID which matches the server name

PHP 警告:“C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll”14.0 与第 0 行未知中与 14.28 链接的此 PHP 版本不兼容

所以我从 SO 的另一篇文章中找到了一个解决方案,你可以在这里找到


推荐阅读