php 为什么 Apache 不会在 XAMPP 安装中启动?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18760628/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 18:10:51  来源:igfitidea点击:

Why won't Apache start in XAMPP installation?

phpwindowsapacheinstallerxampp

提问by Timothy Armoo

I've taken the first steps to learning PHP - think it would be a good step in the right direction. I would like some help however on installing XAMPP. I have downloaded the file and all that through the Apache Friends site, but when I head to to control panel, I get numerous errors.

我已经迈出了学习 PHP 的第一步 - 认为这将是朝着正确方向迈出的一大步。但是,我需要一些有关安装 XAMPP 的帮助。我已经通过 Apache Friends 网站下载了该文件和所有内容,但是当我前往控制面板时,出现了许多错误。

This is what it says for me:

这就是它对我说的:

**10:21:53  [Apache]    Problem detected!
10:21:53  [Apache]  Port 80 in use by "Unable to open process" with PID 4!
10:21:53  [Apache]  Apache WILL NOT start without the configured ports free!
10:21:53  [Apache]  You need to uninstall/disable/reconfigure the blocking application
10:21:53  [Apache]  or reconfigure Apache and the Control Panel to listen on a different port
10:21:53  [Apache]  Problem detected!
10:21:53  [Apache]  Port 443 in use by "C:\Program Files (x86)\Skype\Phone\Skype.exe" with PID 3748!
10:21:53  [Apache]  Apache WILL NOT start without the configured ports free!
10:21:53  [Apache]  You need to uninstall/disable/reconfigure the blocking application
10:21:53  [Apache]  or reconfigure Apache and the Control Panel to listen on a different port
10:21:53  [main]    Starting Check-Timer
10:21:53  [main]    Control Panel Ready**

Could someone please tell me what this means and how I remedy it? Thanks very much.

有人可以告诉我这是什么意思以及我如何补救吗?非常感谢。

回答by teo

It seems that port 80 and 443 is used by another program. From my experince - open Skype. Go to Tools -> Options -> Advanced -> Connection. Please uncheck "use port 80 and 443 as alternatives...."

似乎端口 80 和 443 被另一个程序使用。根据我的经验 - 打开 Skype。转到工具 -> 选项 -> 高级 -> 连接。请取消选中“使用端口 80 和 443 作为替代....”

enter image description here

在此处输入图片说明

Then, try to restart Apache.

然后,尝试重新启动 Apache。

回答by TMess

I tried this and it worked really well...

我试过这个,效果非常好......

As you have already figured the port 80 is in use by something with pid 4

正如您已经发现端口 80 正在被 pid 4 的东西使用

This application's detailed info can be seen using the details tab on the task manager window.

可以使用任务管理器窗口上的详细信息选项卡查看此应用程序的详细信息。

However I found out the application is not writable and hence I figured it shouldn't be touched.

但是我发现该应用程序不可写,因此我认为不应该触及它。

Instead I changed the port of the apachae server on xampp to be 85

相反,我将 xampp 上的 apachae 服务器的端口更改为 85

Open xampp and click on config in front of apache then select the first option that appears allowing you to open httpd.conf and then in the notepad file that opens up, find the word listen and go to the 4th word that it finds.

打开 xampp 并单击 apache 前面的 config,然后选择出现的第一个选项,允许您打开 httpd.conf,然后在打开的记事本文件中,找到单词 listen 并转到它找到的第 4 个单词。

It will read something like Listen 80

它将读取类似 Listen 80 的内容

Change this to any number except 80 (like 85) and voila it work

将此更改为除 80(如 85)以外的任何数字,瞧它工作

回答by Jonast92

Opening the XAMPP control panel as Administrator worked for me.

以管理员身份打开 XAMPP 控制面板为我工作。

回答by Gordon Glas

The solution for me was to:

我的解决方案是:

1) Stop IIS (stop the "World Wide Web Publishing Service" and set its startup type to Manual)

1)停止IIS(停止“万维网发布服务”并将其启动类型设置为手动)

2) Stop the "Web Deployment Agent Service" and set its startup type to Manual.

2) 停止“Web 部署代理服务”并将其启动类型设置为手动。

...as detailed in http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/

...详细见http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/

回答by rightstuff

Port 80 in use by "Unable to open process" with PID 4!

PID 为 4 的“无法打开进程”正在使用端口 80!

A process with a PID of 4 that is taking port 80, is almost always the Window's HTTP.SYSService. It's a type of a proxy service for other services. And it's safe to disable it in most cases.

PID 为 4 且占用端口 80 的进程几乎总是 Window 的HTTP.SYS服务。它是其他服务的一种代理服务。在大多数情况下禁用它是安全的。

From command-line, Run As Admin.

从命令行,以管理员身份运行。

net stop http
sc config http start= disabled

Or you can switch it's Startup Mode to "On Demand".

或者您可以将其启动模式切换为“按需”。

For more options and also a list of other port 80 Services see Opening Up Port 80 For Apache to Use On Windows.

有关更多选项以及其他端口 80 服务的列表,请参阅Opening Up Port 80 For Apache to Use On Windows

回答by Travis

You have to close down Skype. It tells you exactly why it can not start in the error message.

你必须关闭Skype。它会在错误消息中准确地告诉您无法启动的原因。

回答by Girish

in my case a website was configured on IIS , i stopped and it worked well.

在我的情况下,在 IIS 上配置了一个网站,我停止了并且运行良好。

回答by Aditya

Steps which u can try:

您可以尝试的步骤:

1) uninstall or stop Skype and check again after restarting the server.

1) 卸载或停止Skype,重启服务器后再检查。

2) use this to get the port usage details : use cmd netstat -a -b

2)使用它来获取端口使用详细信息:使用cmd netstat -a -b

3) or use this GUI toolto identify the ports used by other programs.

3)或使用此GUI工具识别其他程序使用的端口。

4) uninstall Xammp and try with Wamp Server

4) 卸载 Xammp 并尝试使用 Wamp Server