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

我怎么解决这个问题?


当前回答

我试图在cmd中执行httpd.exe,得到错误,在httpd-vhosts.conf中有语法错误。 我检查了文件,发现了什么问题,现在工作正常。

所以,如果你面临这个错误,那么它可能是因为httpd-vhosts或任何其他文件。

尝试通过cmd执行程序,您将得到错误细节和语法错误所在行。

祝你好运

其他回答

同样的错误。原来我加载了错误版本的zend xdebug扩展。xdebug向导说使用TS(线程安全)版本(即没有- nts -),但显然我下载了错误的非线程安全版本。即使我在php.ini文件中有正确的路径和文件名,我仍然得到错误。当我下载不同的版本,并再次更新php.ini时,一切都运行正常。

php_xdebug-2.7.0-7.3-vc15-nt -x86_64.dll给了我一个错误,但php_xdebug-2.7.0-7.3-vc15-x86_64.dll没有错误

我遇到了同样的问题,结果是我忘记运行setup_xampp.bat(可移植版本)。

在我的情况下,端口已经被windows IIS服务使用。 您可以从cmd检查端口是否已被使用。打开cmd,执行如下命令:

netstat -ano

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

iisreset /stop

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

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

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

有时问题不是端口问题,但可能是由于您所做的错误配置,Apache没有在Windows的事件查看器中记录错误。简单地说

cd C:\xampp\apache\bin

然后运行

httpd.exe

Apache会为你吐出错误,如下所示

AH00526: Syntax error on line 2 of C:/xampp/apache/conf/httpd.conf: Invalid command 'This', perhaps misspelled or defined by a module not included in the server configuration

我希望这能帮助一些可怜的人:)