简体   繁体   English

XAMPP Apache 无法启动

[英]XAMPP Apache won't start

I am using Windows 8 Pro.我正在使用 Windows 8 Pro。 I have just installed XAMPP Windows 1.8.1.我刚刚安装了 XAMPP Windows 1.8.1。 I tried to start Apache from the XAMPP control panel but it wont start.我尝试从 XAMPP 控制面板启动 Apache,但它无法启动。 It gives the following error.它给出了以下错误。

在此处输入图像描述

Also I have no IIS Services running, Web Deployment Agent Service also not running, World Wide Web Publishing Service also not running..我也没有运行 IIS 服务,Web 部署代理服务也没有运行,全球 Web 发布服务也没有运行..

What could be the problem?可能是什么问题呢? Can anyone please help?有人可以帮忙吗?

Error Log错误日志

As previously mentioned above in the comments - and tested out myself:正如前面在评论中提到的 - 并测试了自己:

This error is rather ambiguous.这个错误比较含糊。 Therefore, you should check the error.log located at \\xampp\\apache\\logs因此,您应该检查位于\\xampp\\apache\\logs的 error.log

When I had this issue, it was because Skype was already listening on port 80 & 445. I was able to get around this by exiting Skype, starting the Apache service, and then restarting Skype.当我遇到这个问题时,是因为 Skype 已经在侦听端口 80 和 445。我可以通过退出 Skype,启动 Apache 服务,然后重新启动 Skype 来解决这个问题。 You can check the current port listeners by opening a command prompt and typing Netstat -a您可以通过打开命令提示符并键入Netstat -a来检查当前端口侦听器

It is also recommended to have User Account Control OFF as it may block some features built into xxamp.还建议关闭用户帐户控制,因为它可能会阻止 xxamp 内置的某些功能。

Prior to this though, I had an issue after I modified my Apache httpd.conf file.但在此之前,我在修改 Apache httpd.conf 文件后遇到了问题。 Reverting those changes (or reinstalling in the user's case) will resolve that issue.恢复这些更改(或在用户的情况下重新安装)将解决该问题。

To Windows users:对于 Windows 用户:

You can easily "debug" this error by calling the apache httpd-service directly.您可以通过直接调用 apache httpd-service 轻松“调试”此错误。

  1. Go to XAMPP\\apache\\bin转到XAMPP\\apache\\bin
  2. Open a cmd-shell or Powershell here (From explorer: 'Shift' + 'right click' on a blank area in the folder)在此处打开 cmd-shell 或 Powershell(来自资源管理器:“Shift”+“右键单击”文件夹中的空白区域)
  3. enter httpd.exe输入httpd.exe
  4. read the output读取输出

It is usually something within one of the many *.conf-files in the XAMPP\\apache\\conf\\extra folders.它通常位于XAMPP\\apache\\conf\\extra文件夹中的多个 *.conf 文件之一中。

I had this problem as well in XAMPP [XAMPP Control Panel v3.2.1] on Windows 8 64bit.我在 Windows 8 64 位上的 XAMPP [XAMPP 控制面板 v3.2.1] 中也遇到了这个问题。

The first thing I done was to use the "Take Ownership" command (see below for a link) and this created a better error message.我做的第一件事是使用“Take Ownership”命令(参见下面的链接),这创建了一个更好的错误消息。

From the error message above it changed to: 5:49:08 pm [Apache] Problem detected!从上面的错误消息更改为:下午 5:49:08 [Apache] 检测到问题! 5:49:08 pm [Apache] Port 80 in use by "C:\\Program Files (x86)\\Skype\\Phone\\Skype.exe" with PID 4968!下午 5:49:08 [Apache] 端口 80 被“C:\\Program Files (x86)\\Skype\\Phone\\Skype.exe”使用,PID 为 4968! 5:49:08 pm [Apache] Apache WILL NOT start without the configured ports free!下午 5:49:08 [Apache] 如果配置的端口不可用,Apache 将不会启动! 5:49:08 pm [Apache] You need to uninstall/disable/reconfigure the blocking application 5:49:08 pm [Apache] or reconfigure Apache and the Control Panel to listen on a different port下午 5:49:08 [Apache] 您需要卸载/禁用/重新配置阻止应用程序 下午 5:49:08 [Apache] 或重新配置 Apache 和控制面板以侦听不同的端口

Closing skype fixes this, reopening skype allows it to change the port number itself.关闭 Skype 可以解决这个问题,重新打开 Skype 允许它自己更改端口号。

Adding this only because Google finds this error as the best result for "xampp apache wont start".添加这个只是因为谷歌发现这个错误是“xampp apache wont start”的最佳结果。 Sorry for posting on an older issue.很抱歉在旧问题上发帖。

Take Ownership Command: http://www.eightforums.com/tutorials/2814-take-ownership-add-context-menu-windows-8-a.html获取所有权命令: http : //www.eightforums.com/tutorials/2814-take-ownership-add-context-menu-windows-8-a.html

I am using Window 7 and It was same problem with me,I am using Skype and Not start Apache, but finally solved this problem, and It's working now我正在使用 Window 7,这与我有同样的问题,我正在使用 Skype 而没有启动 Apache,但最终解决了这个问题,现在可以使用了

Check connection setting In Skype click tools -> click option -> click Advanced -> click connection Unchecked port number and click Save.检查连接设置在Skype中单击工具->单击选项->单击高级->单击连接未检查的端口号,然后单击保存。

Look in the control panel: the service has not been installed yet!在控制面板中查看:该服务尚未安装!

Click the (X) button to install apache in windows service and reboot, it should be working now.单击 (X) 按钮在 windows 服务中安装 apache 并重新启动,它现在应该可以工作了。

I had the same error, the error logs where empty, I ended up installing Apache as a service via XAMPP.我遇到了同样的错误,错误日志为空,我最终通过 XAMPP 将 Apache 作为服务安装。

Now when I try and start Apache I at least get some informative errors in Windows Event Viewer.现在,当我尝试启动 Apache 时,我至少会在 Windows 事件查看器中收到一些信息性错误。

Turned out to be a missing directory for a vhost, easy fix, however I was only able to view this error when attempting to start Apache as a service.原来是 vhost 缺少目录,很容易修复,但是我只能在尝试将 Apache 作为服务启动时查看此错误。

First of all, after installation restart windows.首先,安装后重启windows。 As strange as it may be, this does matter.尽管很奇怪,但这确实很重要。 Also, check all apps occupying port 80 (eg Skype).另外,检查所有占用 80 端口的应用程序(例如 Skype)。

Finally, what resolved my situation - port 443. VMWare have been using this port.最后,是什么解决了我的情况 - 端口 443。VMWare 一直在使用这个端口。 AFter killing the VMWare process, Apache worked just fine.在杀死 VMWare 进程后,Apache 工作得很好。

I reinstalled it in another drive and that fixed it.我在另一个驱动器中重新安装了它并修复了它。 But I have no idea what caused the problem in the first place.但我不知道是什么导致了这个问题。

I commented Listen 443 directive in httpd-ssl.conf located on C:\\xampp\\apache\\conf\\extra, and that did the trick for me.我在位于 C:\\xampp\\apache\\conf\\extra 的 httpd-ssl.conf 中评论了 Listen 443 指令,这对我有用。 Next restart Apache was green下次重启Apache是​​绿色的

I had the same problem.我有同样的问题。 I started the Xampp Control Panel as an Administrator.我以管理员身份启动了 Xampp 控制面板。 That worked.那奏效了。

For Linux Users:对于 Linux 用户:

The solution: In terminal: sudo /etc/init.d/apache2 stop解决办法:在终端:sudo /etc/init.d/apache2 stop

Edit: If you still get this kind of error at next computer start then you probably have apache2 process starting at computer startup.编辑:如果您在下次启动计算机时仍然遇到此类错误,那么您可能在计算机启动时启动了 apache2 进程。

To prevent apache2 starting automatically at startup: cd /etc/init.d/ sudo update-rc.d -f apache2 remove防止 apache2 在启动时自动启动: cd /etc/init.d/ sudo update-rc.d -f apache2 remove

Reboot your computer and now hopefully you can turn on Apache from the XAMPP Control Panel!重新启动您的计算机,现在希望您可以从 XAMPP 控制面板打开 Apache!

Some process is using the port 443, so you can change the port that is used by xampp, to be able to use it.某些进程正在使用端口 443,因此您可以更改 xampp 使用的端口,以便能够使用它。 For this job you have to do this:对于这项工作,您必须这样做:

1- Open httpd-ssl.conf in xampp\\apache\\conf\\extra 1- 在 xampp\\apache\\conf\\extra 中打开 httpd-ssl.conf

2- Look for the line containing Listen 443 2- 查找包含 Listen 443 的行

3- Change port number to anything you want. 3- 将端口号更改为您想要的任何内容。 I use 4430. ex.我使用 4430。例如。 Listen 4430.听4430。

4- Replace every 443 strings in that file with 4430 and save the file. 4- 用 4430 替换该文件中的每 443 个字符串并保存文件。

I experienced this issue and I preferred to free up the port .80 and my XAMPP/Apache restarted again.我遇到了这个问题,我更喜欢释放端口 .80,然后我的 XAMPP/Apache 再次重新启动。 This is how I made the port .80 free.这就是我让 .80 端口免费的方式。 First: -Open a command prompt and type this :首先: - 打开命令提示符并键入:

netstat -aon | findstr :80

You'll get this display:你会得到这样的显示: 在此处输入图片说明

Then type this command:然后输入这个命令:

tasklist /fi "pid eq 4"

You'll get the name of the process using the is displayed.您将使用显示获得进程的名称。 Now, press: Win+R services.msc in the invite, then press Ok.现在,在邀请中按:Win+R services.msc,然后按确定。 Now you can start stopping all services which can use the port .80.现在您可以开始停止所有可以使用端口 .80 的服务。

Find some of them here: W3SVC,WAS,SSRS,PeerDistSvc,NcbService.在这里找到其中的一些:W3SVC、WAS、SSRS、PeerDistSvc、NcbService。

After trying all the suggestion given above.在尝试了上面给出的所有建议之后。 Disable this, install that.禁用这个,安装那个。 I opened the xampp-control manager from the start but this this as administrator.我从一开始就打开了 xampp-control 管理器,但这是以管理员身份打开的。 After I opened it.我打开之后。 MySQL was disable. MySQL 被禁用。 I disable all of the program and enable apache first and then MySQL.我禁用所有程序并先启用 apache,然后启用 MySQL。 Suddenly start working with no problem.突然开始工作没有问题。

I gave all users full access on the xampp folder, inclusive subdirectories.我为所有用户提供了对 xampp 文件夹(包括子目录)的完全访问权限。 Afterwards it worked.后来它起作用了。

Open services.msc directly from command prompt and disabled SQL Server reporting services直接从命令提示符打开 services.msc 并禁用 SQL Server 报告服务

& SQL Server analysis services. & SQL Server 分析服务。

I had the same case .我有同样的情况。 The reason was that I had changed htdocs folder location to another drive and although made appropriate configuration, for physical reasons, when starting apache the drive was not accessible: After making it accessible the problem has been solved .原因是我已将 htdocs 文件夹位置更改为另一个驱动器,尽管进行了适当的配置,但由于物理原因,在启动 apache 时驱动器无法访问:在使其可访问后,问题已解决。 Generally it seems logical that when apache doesn't find all of the components it won't start.一般来说,当 apache 没有找到所有组件时,它不会启动似乎是合乎逻辑的。

i had the same problem but after i went into the readme, i realised that i didn't have Microsoft Visual C++ 2008 Redistributable installed.我遇到了同样的问题,但在阅读自述文件后,我意识到我没有安装 Microsoft Visual C++ 2008 Redistributable。 after i instaled it, all worked just fine我安装后,一切正常

虽然这个人的问题似乎已经回答了,但我只想补充一点,我收到这个错误是因为我的 httpd-vhosts.conf 文件中有一个错字(赶时间,没有在 VirtualHost 标签上指定端口) .

If you have skype shutdown and the problem still persists.如果您已关闭 Skype 并且问题仍然存在。 Try this.试试这个。 It could be that apache is set to automatic on restart.可能是 apache 在重启时设置为自动。 Meaning apache is already using that port.这意味着 apache 已经在使用该端口。 Go to services in your XAMPP control and look for apache (whatever version you have).转到 XAMPP 控件中的服务并查找 apache(无论您拥有什么版本)。 Look for startup type and double-click it to set it to manual.查找启动类型并双击它以将其设置为手动。

Hope this works!希望这有效!

If it helps to anyone, I currently use VMWare Workstation in my computer, and it also blocks Apache from starting, because VMWare Workstation listens for requests on port 443.如果对任何人有帮助,我目前在我的计算机中使用 VMWare Workstation,它还会阻止 Apache 启动,因为 VMWare Workstation 侦听端口 443 上的请求。

You can either comment out "listen 443" inside the "httpd-ssl.config" or you can disable "Shared VMs" from VMWare Workstation General Preferences.您可以在“httpd-ssl.config”中注释掉“listen 443”,也可以从 VMWare Workstation General Preferences 中禁用“Shared VMs”。

It's simple if you guys have and use your skype ports turn them ports off from the skype settings->Connections and unmark the port like where it sez ports 80 till 443.如果你们拥有并使用Skype端口,那就很简单,从Skype设置->连接中关闭它们的端口,然后取消标记端口,就像它在80到443之间设置端口一样。

Problem Solved!!!问题解决了!!!

Try to run it with administrator permission尝试以管理员权限运行它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM