我刚刚重新安装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用户的最佳解决方案是:

打开netstat (from XAMPP CONTROL PANEL) 查找使用80端口的进程的PID。 用Administrative打开CMD。 执行taskkill /pid pid(用netstat中找到的pid代替pid) Heyy enjoy u Done.....

其他回答

步骤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和443似乎在某种程度上是标准的,例如,如果您将80更改为8080,那么您将不得不以这种方式访问您的网站:

localhost: 8080 / path_to_your_website.php

发生此错误是因为为Apache分配的端口被另一个程序使用。要检查使用端口的应用程序,我们为Apache分配的端口,可以通过单击,

Netstat按钮。

这是Netstat文件,

首先,我为Apache分配了8080端口,我最近安装的Oracle DB.TNSLSNR.exe现在已经使用了8080端口。

因此,通过查看这个文件,我们可以选择一个与其他应用程序不冲突的端口。在我的例子中,端口8060与任何应用程序都没有冲突。通过选择,我们可以改变httpd.conf文件(XAMPP控制面板->配置)如上所述。

我试了所有的办法,但我的问题还是没有解决。事实证明,在安装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”(C:\xampp\apache\conf\httpd.conf)文件和“httpd-ssl.conf”(C:\xampp\apache\conf\extra\httpd-ssl.conf)文件来解决。 如果问题仍然存在,你可以检查你的skype端口。

But in my case this was different. I had to make changes in "server.crt"(C:\xampp\apache\conf\ssl.crt\server.crt) file.Try running your xammp apache from the command line in administration mode. "C:\xampp\apache\bin\httpd.exe" This will give you the errors -in which file and -which line. Likewise, I had an error in server.crt file which was blank. If you have xammp running in any other system, just copy the contents of this file(C:\xampp\apache\conf\ssl.crt\server.crt) and paste in your server.crt file and You are Done!

感谢和问候 阿卡纳