我刚刚重新安装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

我怎么解决这个问题?


当前回答

对我来说,这要容易得多。我关闭了本地windows防火墙。然后重新加载comp启动xampp并再次启动apache。然后把防火墙重新打开。

其他回答

原因之一可能是您不是以管理员身份运行XAMPP控制面板。

我也有同样的问题(在Windows 8.1上),但我只是通过提取到C:\而不是C:\somefolder来解决它,就像我一开始做的那样。例如,控制面板的路径现在是C:\xampp\xampp-control.exe

对我来说,这要容易得多。我关闭了本地windows防火墙。然后重新加载comp启动xampp并再次启动apache。然后把防火墙重新打开。

我收到了与OP完全相同的错误消息,但现有的任何答案都没有解决我的问题。许多答案涉及端口80上的冲突,我知道我没有冲突,因为我最近在端口80上有localhost响应。

结果我无意中改变了ServerRoot,当我打算改变DocumentRoot(愚蠢,我知道),虽然新的ServerRoot目录存在,但它不包含配置文件和apache所需的其他东西,这导致它在启动时失败。错误消息可能通过“缺少依赖项”来解决这种情况。

在我的Windows系统上,将ServerRoot设置回C:/XAMPP/apache解决了这个问题。

最好的解决方案

打开XAMPP控制面板,单击Apache的config,然后单击Apache(httpd.config)。现在在文本编辑器中。ctrl+f—>找到“Listen 80”,并将其替换为“Listen 8079”,不带引号:) 但是现在你必须像这样使用它http://localhost:8079/

p.s.,我试图改变skype的端口设置,停止我在windows 10中找不到的Web部署代理服务,cmd——> net stop http和其他方法,但除了这个没有任何工作。