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

我怎么解决这个问题?


当前回答

最好的解决方案

打开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和其他方法,但除了这个没有任何工作。

其他回答

我试了所有的办法,但我的问题还是没有解决。事实证明,在安装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现在可以正常运行了

我的问题是在httpd.conf中的DocumentRoot和<Directory>条目指向不存在的文件夹。

例如,'原始' httpd.conf有以下条目:

DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">

如果您已经安装在C:\xampp中,那么您需要更改这些条目以匹配。

DocumentRoot "c:/xampp/htdocs"
<Directory "c:/xampp/htdocs">

最好的解决方案

打开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和其他方法,但除了这个没有任何工作。

如果你正在使用Skype,你会得到这个错误。

只需按Ctrl+Alt+Del goto任务管理器选择Skype,然后单击结束任务,然后返回并启动Apache,一旦Apache启动成功。然后再打开Skype现在都将工作良好。

无需更改任何端口。

您可以做的简单的事情是检查Skype或VMware是否安装在您的机器上。

Skype使用端口80和443作为传入连接的附加端口。如果需要在Skype中修改端口号,请转

工具>连接选项>连接

在Skype窗口。现在将默认的80端口号更改为其他端口号。

VMware Workstation使用443端口进行共享。要改变这一点,打开VMware工作站,然后转到

编辑>首选项>共享虚拟机

点击“更改设置”按钮 然后点击“禁用共享” 然后更改正在使用的https端口号(443) 然后点击“启用共享”按钮

这就是你要做的。重新启动XAMPP并运行Apache服务器。