我刚刚重新安装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 IIS服务使用。 您可以从cmd检查端口是否已被使用。打开cmd,执行如下命令:

netstat -ano

如果IIS正在使用它,可以通过以下命令停止它。以管理员身份打开cmd,然后:

iisreset /stop

现在尝试运行XAMPP,它应该可以工作。

其他回答

步骤1:在Apache进入Config,然后选择Apache(httpd.conf)

在记事本中,找到Listen 80并添加另一个80以将端口更改为Listen 8080

请确保在关闭记事本之前保存。

步骤2:在Apache中选择Apache(httpd-ssl.conf)

在记事本中,找到Listen 443,并在443之后再添加3,将端口更改为Listen 4433

然后搜索“VirtualHost default:443”,再添加3,将端口修改为“VirtualHost default:4433”

请确保在关闭记事本之前保存。

(注:这里有一个类似的答案,但它并不适用于我,直到我喜欢YT的视频)

当我使用命令发现没有进程使用端口80时

netstat -abno | find ":80"

使用端口80的任何进程都没有问题。

然后我运行命令(在cmd中)

C:\xampp\apache\bin\httpd.exe

它在httpd-vhosts.conf文件中的虚拟主机配置中显示了一些错误,该文件最近由我编辑,用于在Eclipse IDE中的WordPress PHP环境中安装。所以我删除了这些行,Apache开始得很好。

我通过停止“Web部署代理服务”解决了这个问题。打开:System -> Computer Management -> Services -> Web部署代理服务。停止此服务并启动XAMPP工作。 我想这是MS Webmatrix提供的一项服务。

>系统和保安>管理>服务>网络调送服务

遵循以下步骤:

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。

似乎没有人回答关于执行xampp_start.exe的问题。

我做了所有以前的答案,但它没有解决我的问题。我发现运行xampp_start.exe将为您提供有关该问题的详细信息。

这是我在我这边看到的

正如你所看到的,我有一个路径问题或xampp指向不存在的文件夹。