简体   繁体   English

Xampp Apache模块不起作用-“等待本地主机”错误

[英]Xampp Apache module not working - 'waiting for localhost' error

I have encountered a problem when trying to preview PHP files using the Xampp control panel Apache module. 尝试使用Xampp控制面板Apache模块预览PHP文件时遇到问题。 Basically I open the control panel, click 'start', and have it minimised on my screen. 基本上,我打开控制面板,单击“开始”,并将其最小化在屏幕上。 I then navigate to a PHP page that I want to preview in my browser - but when I try to load it, it just sits there and says 'Waiting for Localhost' on the tab. 然后,我导航到要在浏览器中预览的PHP页面-但是,当我尝试加载该页面时,它只是坐在那里并在选项卡上显示“ Waiting for Localhost”。 The page never loads. 页面永远不会加载。 Has anyone ever encountered this problem before, and if so, is there a simple fix? 以前有没有人遇到过这个问题,如果有,是否有简单的解决方法?

Regards, 问候,

Robert Young 罗伯特·杨

This happened to me and the problem was that some other application was listening on port 80 . 这发生在我身上,问题是其他一些应用程序正在侦听端口80 I couldn't figure out what it was. 我不知道那是什么。 Usually, it would be Skype so I shut down Skype and I still had a problem connecting to localhost. 通常是Skype,因此我关闭了Skype,但仍然无法连接到本地主机。 The other application was Audible Download Manager which automatically starts when I start windows and you can usually see in the windows task manager. 另一个应用程序是Audible Download Manager ,它在我启动Windows时自动启动,通常可以在Windows任务管理器中看到。 Once I closed the app, localhost started working. 关闭应用程序后,本地主机开始工作。

This is how you figure out which application is listening on port 80. 这是您确定哪个应用程序正在侦听端口80的方式。

Go to Start, then Run or type cmd and open cmd.exe. 转到开始,然后运行或键入cmd并打开cmd.exe。 Then type: 然后输入:

 cd desktop
 netstat -a -b -p TCP >port_list.txt

After command runs, port_list.txt will be saved on your desktop. 命令运行后,port_list.txt将保存在您的桌面上。 Open port_list.txt and go through the list and find the application listening to :http. 打开port_list.txt并浏览列表,找到监听:http的应用程序。 Then find the application under processes in your windows task manager and end the process. 然后在Windows任务管理器中的进程下找到该应用程序,然后结束该进程。

I had similar issue... Here is what you can do: 我有类似的问题...这是您可以做的:

Step 1: on xampp control panel checkout netstat & look if any other application is using that port as your xampp 步骤1:在Xampp控制面板上检出netstat并查看是否有任何其他应用程序正在使用该端口作为Xampp

( If yes then shut down those applications using Task Manager) (如果是,则使用任务管理器关闭这些应用程序)

Step 2: Irrespective of Positive or negative results of step 1, Just Turn off your firewall through control panel. 第2步:无论第1步的结果是正面还是负面,都可以通过控制面板关闭防火墙。

In my case I just had to turn firewall off & it did the miracle. 就我而言,我只需要关闭防火墙,这确实是奇迹。

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

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