我刚刚重新安装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的“配置” 选择Apache (httpd.conf) 在打开的编辑器中,按CTRL+H找到旧文件夹名的所有实例,并用新文件夹名替换它。

例如,在我的例子中,我已经将XAMPP的主安装文件夹名称从Xam更改为XAMPP

在编辑器中修改如下:

Define SRVROOT "G:/Xam/apache"
ServerRoot "G:/Xam/apache"
DocumentRoot "G:/Xam/htdocs"
<Directory "G:/Xam/htdocs">

To

Define SRVROOT "G:/Xampp/apache"
ServerRoot "G:/Xampp/apache"
DocumentRoot "G:/Xampps/htdocs"
<Directory "G:/Xampps/htdocs">

在编辑器中还有许多其他这样的实例,只需找到并替换它们中的每一个。

对Apache (httpd-ssl.conf)也执行同样的操作。

其他回答

在我的情况下,我得到这个问题,因为Bitnami Wordpress是活跃的。

打开Bitanami App 进入服务器管理 确保停止MySql和Apache 重新启动xampp,它将工作。

开放的Skype。

工具—>选项—>高级—>连接。

取消选中“使用端口80和443作为传入连接的替代”复选框

退出并关闭所有Skype窗口。尝试重新启动Apache。

我刚刚在我的xampp v3.2.2 [win 10 pro x64]上遇到了这个错误,

我首先尝试在管理cmd中运行“net stop http”命令,但它没有解决问题,所以我继续尝试“netstat -abno”命令,我发现ssl端口(443)正在被vmware使用。

因此,我的建议是,不要只寻找阻塞端口80的原因,还要寻找使用端口443的潜在程序。因为我真的不喜欢把我的默认端口号改为8081和4433。

这就是你解决这个问题的方法…

首先输入以下命令

停止HTTP

然后尝试启动apache,如果它仍然不工作。输入以下命令

Netstat -ABNO

你肯定会遇到麻烦的应用,它会占用你宝贵的移植端口。

复制pid,然后使用以下命令

taskkill /f /pid pid

这里的PID是你复制的PID。

希望这能帮助到一些人。

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

net stop http

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

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

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

无需更改任何端口。