Xampp-Apache意外关闭,日志文件为空并且没有事件 [英] Xampp - Apache Shuts Down Unexpectedly, Empty Log File And No Events

查看:289
本文介绍了Xampp-Apache意外关闭,日志文件为空并且没有事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的机器上安装了XAMPP.我正在尝试从XAMPP控制面板运行Apache.

I have XAMPP installed on my machine. I am trying to run Apache from the XAMPP Control Panel.

我通过右键单击快捷方式并选择以管理员身份运行"(我以具有管理员权限的帐户登录)来启动XAMPP控制面板.控制面板启动,并且一切似乎都正常进行(没有错误消息/警告).

I start the XAMPP Control Panel by right-clicking the shortcut and selecting "Run as administrator" (I am logged in on an account with Administrator privileges). The Control Panel starts up and everything appears to be in order (no error messages/warnings).

当我单击Apache旁边的开始按钮时,出现以下错误消息:

When I click the Start button next to Apache I get the following error message:

2:22:44 PM  [Apache]    Attempting to start Apache app...
2:22:45 PM  [Apache]    Status change detected: running
2:22:45 PM  [Apache]    Status change detected: stopped
2:22:45 PM  [Apache]    Error: Apache shutdown unexpectedly.
2:22:45 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
2:22:45 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
2:22:45 PM  [Apache]    Check the "/xampp/apache/logs/error.log" file
2:22:45 PM  [Apache]    and the Windows Event Viewer for more clues

请注意,这是在告诉我Apache意外关闭并检查error.log文件和Windows事件查看器.

Note that it's telling me Apache has shutdown unexpectedly and to check the error.log file and the Windows Event Viewer.

我检查了error.log文件,但它为空:

I checked the error.log file but it's empty:

我还使用Windows事件查看器检查了所有事件,但事件查看器未显示任何事件(在应用程序"下):

I also checked for any events using Windows Event Viewer but the event viewer shows no events (under Application):

我已经检查了可能阻塞端口等的程序(例如Skype,Visual SVN Server),并关闭了可能导致此问题的所有程序.

I have checked for programs that might be blocking ports, etc. (like Skype, Visual SVN Server) and closed any programs that might be causing the issue.

还有什么我可以做的以找出可能发生的事情吗?

Is there anything else I can do to find out what might be going on?

谢谢.

UPDATE

UPDATE

我通过尝试从DOS命令提示符运行apache来解决了这个问题.从命令提示符处运行时,我得到了特定的错误以及这些错误所在的httpd.conf文件中的位置.事实证明,我的 ServerRoot DocumentRoot 值不正确(指向错误的目录).我将它们更改为指向正确的目录,现在可以从控制面板"中启动apache.

I figured out the problem by trying to run apache from a DOS command prompt. Running from the command prompt gave me the specific errors and the location in the httpd.conf file where those errors were. It turns out that my ServerRoot and DocumentRoot values were incorrect (pointing to wrong directories). I changed them to point to the correct directories and now I can start apache from the Control Panel.

很好奇,为什么从控制面板"启动时为什么没有看到有关 ServerRoot DocumentRoot 的错误消息?

Curious, why didn't I see the error messages about ServerRoot and DocumentRoot when launching from the Control Panel?

推荐答案

只想提一下我也使用了命令提示符技术.

Just wanted to mention that I also used the command prompt technique.

我的问题:我已经重新启动了Apache,但无法使该程序重新启动.

MY PROBLEM: I had restarted Apache but was unable to get the program to start again.

解决方案尝试1:这不起作用. 我没有SKYPE这样的程序在端口上运行,但是无论如何我都尝试调整端口设置.

Solution attempt 1: This did not work. I had no programs such as SKYPE hogging the ports, but I tried to adjust my port settings anyway.

解决方案尝试2:这不起作用. 我读过的另一个解决方案是还允许Windows防火墙中的公共访问或禁用防火墙.我尝试过这个.

Solution attempt 2: This did not work. Another solution I had read was to also allow public access in windows firewall or disable firewall. I attempted this.

解决方案尝试3:这确实有效 最后我偶然发现了这个帖子.我打开了gitbash(尽管默认的Windows命令提示符会正常工作).

Solution attempt 3: This did work Finally I stumbled upon this post. I opened gitbash (although default windows command prompt would work fine).

我输入了"cd c:/xampp/apache/bin" 然后输入"httpd"

I typed "cd c:/xampp/apache/bin" I then typed "httpd"

这给我带来了语法错误,并指向我的"httpd-vhosts"文件中的特定行.我弄清楚那行出了什么问题,在我的情况下是缺失的#".保存文件,然后再次键入"httpd".这次apache服务器启动了.

This presented me with a syntax error and pointed me to a specific line in my "httpd-vhosts" file. I figured out what was wrong with that line, in my case a missing "#". Saved the file and then typed "httpd" again. This time the apache server started.

希望这对某些人有帮助!

Hope this helps some people!

这篇关于Xampp-Apache意外关闭,日志文件为空并且没有事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆