為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Can't establish connection to localhost

  • 3 回覆
  • 28 有這個問題
  • 1 次檢視
  • 最近回覆由 Rewt0r

more options

Hi There,

As of today I seem to be having a strange issue with Firefox 31, I'm unsure as to when this problem began as I haven't developed on this project for around 2 weeks. I have a PHP Development server running on localhost port 8000 using the following command: "bin\php -S localhost:8000 -c php.ini" (without quotes)

Upon trying to connect to this server via Firefox I'm presented with "Firefox can't establish a connection to the server at 127.0.0.1:8000." the message adjusts to show "localhost:8000" when connecting via that method, I've tried running Firefox in Safe Mode, reinstalling Firefox and also changing the network settings to "No Proxy" from "Using system proxy settings".

I'm able to connect through Chrome, IE and also by running a cURL command.

Hi There, As of today I seem to be having a strange issue with Firefox 31, I'm unsure as to when this problem began as I haven't developed on this project for around 2 weeks. I have a PHP Development server running on localhost port 8000 using the following command: "bin\php -S localhost:8000 -c php.ini" (without quotes) Upon trying to connect to this server via Firefox I'm presented with "Firefox can't establish a connection to the server at 127.0.0.1:8000." the message adjusts to show "localhost:8000" when connecting via that method, I've tried running Firefox in Safe Mode, reinstalling Firefox and also changing the network settings to "No Proxy" from "Using system proxy settings". I'm able to connect through Chrome, IE and also by running a cURL command.

由 Rewt0r 於 修改

被選擇的解決方法

Hi guis2,

Referring back to the page you linked to, it seems that the IPv6 section applied to my issue somewhat. For some reason network.dns.disableIPv6 was already set to true however once I set this to false localhost:8000 began to work.

從原來的回覆中察看解決方案 👍 4

所有回覆 (3)

more options

This may help check out: [about:networking] In the developer toolbar you can see if there is a cookie with local host stored as well with : cookie list And please also try these steps: Firefox can't load websites but other browsers can

more options

Hi guigs2,

about:networking gives no more information than I already know, after navigating to "localhost:8000" there's an entry in the DNS tab:

Hostname Family Addresses Expires (Seconds) localhost ipv4 127.0.0.1 46

Http Tab Hostname Port SPDY SSL Active Idle localhost 8000 false false 0 0

I've already cleared my cache and cookies and as a result "cookie list" produces "No cookies found for host localhost:8000"

I've already taken the steps in the link you provided (refer to original post), changing proxy settings has no effect, reinstalling has no effect, running firefox in safemode has no effect, firefox is allowed in the Windows firewall (not that this would make a difference since it's localhost)

more options

選擇的解決方法

Hi guis2,

Referring back to the page you linked to, it seems that the IPv6 section applied to my issue somewhat. For some reason network.dns.disableIPv6 was already set to true however once I set this to false localhost:8000 began to work.