我刚刚重新安装XAMPP,当我试图在XAMPP控制面板中启动我的Apache服务器时,我现在得到以下错误:

16:50:25  [Apache]     Status change detected: running
16:50:26  [Apache]     Status change detected: stopped
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

我怎么解决这个问题?


当前回答

我试了所有的办法,但我的问题还是没有解决。事实证明,在安装Visual Studio 2019之后,我的c++可重分发文件发生了很多变化。

我实际上在跑步

test_php.bat

它告诉了我错误是什么

C:\Windows\SYSTEM32\VCRUNTIME140.dll' 14.0与此PHP构建不兼容,该PHP构建在未知的第0行中链接到14.28

因此,我开始了:

微软Visual Studio网站->其他工具,框架,和 > Microsoft Visual c++ Redistributable for Visual Studio 2019

和下载。安装文件并重新启动我的电脑后,问题就解决了。Apache现在可以正常运行了

其他回答

这对我很有用,我想和大家分享

如果您已经按照本文中的步骤为xampp创建了ssl

打开C: \ xampp \ apache \ conf \额外\ httpd-xampp.conf

检查SSLCertificateFile "crt/site.test/server.crt"

如果网站。在httpd-xampp.conf中的test是不同的,然后检查C:\xampp\apache\crt\#YOUR_SITE_NAME_HERE\。 改变网站。在httpd-xamp .conf中测试#YOUR_SITE_NAME_HERE

我遇到了同样的问题,结果是我忘记运行setup_xampp.bat(可移植版本)。

我的例子很简单。

我在我的以太网端口上设置了一个本地IP地址。

然后出现这个错误。结果我并没有连接 将电缆连接到它,因此IP不会解析为Apache中的IP集。

解决方案是将电缆连接到交换机或路由器。然后可以启动Apache。

遵循以下步骤:

Open your XAMPP control panel then click its "Config" Choose the "Apache (httpd.conf)" and find this code below and change it into this one: #Change this to Listen on specific IP addresses as shown below #to prevent Apache from glomming onto all bound IP addresses. #Listen 0.0.0.0:80 #Listen [::]:80 Listen 80 # Dynamic Shared Object (DSO) Support Save it (Ctrl + S) After that, go back to the XAMPP control panel and click its config again. Choose "Apache (httpd-ssl.conf)", find this code below, and change it again: # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two # Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" # #Listen 0.0.0.0:443 #Listen [::]:443 Listen 443 Save it (Ctrl + S) Then, click the "config" (note: above the netstat) and click the "service and port settings". Change "Main Port" to 8080 and "SSL Port" to 4433, then save it. Finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off". Uncheck your "Internet Information Services", and then click OK.

只需等待它,您的计算机/笔记本电脑将自动重新启动,并尝试再次打开XAMPP控制面板,然后启动Apache。

对我来说,万维网发布服务使用的是80端口。我通过在cmd上运行以下命令来杀死它:

net stop http

在那之后,XAMPP运行Apache没有任何问题。