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

我怎么解决这个问题?


当前回答

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

net stop http

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

其他回答

在我的情况下,这发生在安装sql server和解决方案是在这个答案中描述

Xampp -安装SQL Server和Visual Studio后无法启动Apache

所以我不得不从Windows服务中禁用“SQL Server Reporting Services”服务

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

在我的情况下,这个问题是由于试图下载bitnami的其他产品,如WordPress。这在我们通过XAMPP安装WordPress时很常见。它被放置在xampp/app目录中,可以从xampp应用程序主页访问。

作为解决方案,我从xampp目录中删除了默认安装的WordPress,并手动将WordPress安装在WordPress的htdocs文件夹中,方法是下载并将zip文件解压到htdoc文件夹中。在卸载/删除默认WordPress后,您还需要重新启动XAMPP或系统。我现在一切都好了。

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

net stop http

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

如果上面所有的答案都不奏效,那么就这么做。注释掉php.ini文件中的所有扩展名。

In xampp control panel, click on Apache config. click on php.ini In php ctrl + F (extension) to find all extensions in your php.ini Comment out each and every active extension by adding a ; at the start of each extension line. example ;;;extension=bz2 i put 3 ;;; because i wanted to know ones i commented out so that when i come back to deburg which one had a problem, it was easy for me to see which ones i commented out. Make sure all extensions=whatever are commented out. Run your apache server. To pickup which extension was the problem, one by one un-comment your extensions while restarting your server until you catch the culprit.