我试过删除skype,但那不工作,我试过关闭万维网的东西,IIS关闭似乎没有什么工作。

12:51:22 PM  [Apache]   Problem detected!
12:51:22 PM  [Apache]   Port 80 in use by "Unable to open process" with PID 4!
12:51:22 PM  [Apache]   Apache WILL NOT start without the configured ports free!
12:51:22 PM  [Apache]   You need to uninstall/disable/reconfigure the blocking application
12:51:22 PM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port

当前回答

摘自本文:

转到运行命令并输入: Netstat -o -n -a | findstr 0.0:80

这里的最后一个数字是使用它的进程ID。这是最常见的IIS或其他web相关的服务,很容易解决,但每一段时间(经常会在谷歌上四处看看),它似乎是PID 4 -根据Windows任务管理器是NT内核和系统。这不是很有帮助,因为杀戮会导致蓝屏死机。

占用端口80的东西与IIS或web无关,它是SQL Server报告服务。关闭任何类似SQL Server服务的东西,重新启动Apache,不需要重新启动。

所以PID 4监听端口80的问题?检查SQL服务并关闭它们。

更新- - - @sangam的评论:

工作在一个镜头。在我的例子中,结果是SQL server报告 服务。我停止了所有已安装实例的服务,并且 它工作了(没有重新启动机器)。

其他回答

对我来说通常有效: -关闭Skype —关闭“services.msc”中显示的所有SQL Server进程 -关闭services.msc中的万维网出版

所以我在尝试启动Apache服务时也遇到了同样的问题,我想与大家分享我的解决方案。 以下是关于可能使用端口80的服务或程序的一些注意事项:

Skype: Skype uses port 80/443 by default. You can change this from Tools -> Options -> Advanced -> Connections and disable the checkbox "use port 80 and 443 for addtional incoming connections". IIS: IIS uses port 80 be default so you need to shut it down. You can use the following two commands: net stop w3svc, net stop iisadmin. SQL Server Reporting Service: You need to stop this service because it may take port 80 if IIS is not running. Go to local services and stop it. VMware Workstation: If you are running VMware Workstation, you need to stop the VMware Workstation server - port 443 as well.

这些选项与我一起工作,我可以启动Apache服务而没有错误。

另一个选项是将Apache监听端口从httpd.conf更改,并设置另一个端口号。

希望这个解决方案能帮助那些再次面临同样问题的人。

在Ubuntu默认情况下,系统不允许你占用特权端口[0到1023],除了指定端口为80,你需要用sudo运行XAMP。

我也有同样的问题。经过一些谷歌搜索到达这个页面。由于我猜想这个错误可能有各种各样的原因,所以听听我的经验:

Xampp红线日志:

12:53:54 PM  [Apache] Problem detected!
12:53:54 PM  [Apache]   Port 443 in use by "Unable to open process" with PID 3908!
...

最后,我发现在我的php代码中有这样一行代码:

$res = file_get_contents("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");

这段代码的目的是从服务器的某个地方获取php结果的镜像。但它只是被困在一个获得自己内容的循环中!

我修复了代码:

$res = file_get_contents(str_replace("my_uri.php" , "mirror_uri.php" , "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));

然后我重启apache…apache错误再也没有发生过。

因此,有时在代码中搜索可能的停止点是一个好方法。

以管理员身份打开CMD提示符并执行以下命令: 净止损为/y 打开运行对话框(按Win+R),然后键入:services.msc 然后搜索万维网发布服务(WWW-Publishing Service)和Web部署代理服务并停止它们。您还应该禁用它们。 用XAMPP重新启动Apache:)

链接编号:https://www.sitepoint.com/unblock-port-80-on-windows-run-apache/