Xampp Apache服务器赢得';t启动-“启动”;错误:Apache意外关闭;

Xampp Apache服务器赢得';t启动-“启动”;错误:Apache意外关闭;,apache,xampp,Apache,Xampp,我在互联网上到处寻找答案,但没有成功。几个月前我下载了xampp,直到最近一切都很好。当我无法访问localhost时,我注意到了这个问题,所以我进入xammp控制面板,看到apache被关闭了。每当我收到此消息时,单击“立即开始”—— 13:41:55 [Apache] Error: Apache shutdown unexpectedly. 13:41:55 [Apache] This may be due to a blocked port, missing dependencie

我在互联网上到处寻找答案,但没有成功。几个月前我下载了xampp,直到最近一切都很好。当我无法访问localhost时,我注意到了这个问题,所以我进入xammp控制面板,看到apache被关闭了。每当我收到此消息时,单击“立即开始”——

13:41:55  [Apache]  Error: Apache shutdown unexpectedly.
13:41:55  [Apache]  This may be due to a blocked port, missing dependencies, 
13:41:55  [Apache]  improper privileges, a crash, or a shutdown by another method.
13:41:55  [Apache]  Press the Logs button to view error logs and check
13:41:55  [Apache]  the Windows Event Viewer for more clues
13:41:55  [Apache]  If you need more help, copy and post this
13:41:55  [Apache]  entire log window on the forums

一个常见的答案似乎是在httpd.conf文件中将端口从80更改为8080,然后在httpd-ssl.conf文件中将端口从443更改为4433。我已经这样做了,但仍然没有工作。当我检查apache错误日志时,它说-

AH00020: Configuration Failed, exiting
值得一提的是,几天前我在本地服务器上安装了Wordpress,这可能与此有关?我尝试了一切,从重新启动我的电脑到运行完整的病毒扫描,但似乎没有任何效果

我使用的是Windows10、Apache 2.4版和PHP7

我现在还尝试在Shell中键入命令“httpd-t”,它返回“syntaxok”。这里还有一个来自apache错误日志的示例-

PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
[Tue Jun 09 04:15:03.462661 2020] [:emerg] [pid 4160:tid 548] AH00020: Configuration Failed, exiting
[Tue Jun 09 12:54:30.209908 2020] [core:warn] [pid 4000:tid 684] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
[Tue Jun 09 12:54:30.239019 2020] [:emerg] [pid 4000:tid 684] AH00020: Configuration Failed, exiting
感谢您抽出时间阅读此文,如果有人有任何想法,我们将不胜感激。

  • 你检查过日志文件了吗
  • 有时重新启动计算机会有帮助。然后再次启动xampp

    • 好的,我已经设法解决了这个问题

      对于有相同问题的任何人(即使端口80可用,apache也不会启动),此信息可能非常有用

      当我查看apache错误日志时,有许多错误,但导致问题的特定错误是-

      PHP Warning:  'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
      
      如果其他人出现此错误,可以通过安装“Visual Studio 2015、2017和2019”运行时(x64:vc_redist.x64.exe)来解决。这是你可以下载它的链接

      下载完成后,进入xampp文件夹,右键单击xampp-control.exe,单击“以管理员身份运行”,然后您应该可以毫无问题地启动apache


      希望这将有助于任何人谁结束在相同的情况下,我做了

      共享
      httpd-t
      命令输出以供查看。同时共享错误日志谢谢!这起作用了。。。后来又出现了另一个错误,因为股票Apache配置显然是垃圾。也必须这样做。。。