我已经在互联网上搜索了很多答案,但都没有成功。几个月前,我下载了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,也许与它有关?我已经尝试了一切,从重新启动计算机到运行完整的病毒扫描,似乎没有任何效果。
我正在使用Windows 10,Apache 2.4和PHP 7。
我现在也尝试在Shell中键入命令“ httpd -t”,它返回“语法正确”。这也是来自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
感谢您抽出宝贵的时间阅读本文,如果有人有任何想法,将不胜感激。
答案 0 :(得分:2)
好的,我已经解决了这个问题。
对于遇到相同问题(即使端口80可用,apache也无法启动)的人,此信息可能很有用。
当我查看apache错误日志时,有很多错误,但是引起问题的特定错误是-
dict((Iterable))
如果其他人遇到此错误,则可以通过安装“ Visual Studio 2015、2017和2019”运行时来解决(x64:vc_redist.x64.exe)。这是您可以下载的链接。
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
下载完成后,进入xampp文件夹并右键单击xampp-control.exe,单击“以管理员身份运行”,那么您应该可以毫无问题地启动apache。
希望这会帮助在与我相同的情况下结束比赛的任何人。
答案 1 :(得分:0)