Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 04, 2008 06:43AM

For some weird reason I can't connect to localhost, no mather what wamp-package I've tried (wampserver, xamp, and some other too). When trying to connect to localhost or 127.0.0.1 it just tries and tries, forever, lagging down my connection to the internet so I can't browse any other sites at the same time.

I've tried:
* Opening ports in the router
* Disabling the Windows Firewall
* Reinstalling multiple times

I know that it should work cause I'm sure I had WAMP just recently.

I'm using Windows XP (fully updated), and the latest WampServer package.

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: toivo (---.belrs4.nsw.optusnet.com.au)
Date: April 04, 2008 10:25AM

Hi,

Are you sure some other application is not using port 80 for example? Check the PHP and MySQL error log for indications of what is going wrong or copy the messages and post them here.

If you run the following command in the DOS window, it will tell which application is using port 80 and/or port 3306. It will take quite a long time to complete:

netstat -ab | more


If you have installed a multitude of servers, you may still have some leftovers in your system.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 04, 2008 04:46PM

I'm positive that nothing uses the port 80.
The XAMP package comes with a small program which checks to see if a small number of ports is open and if not, what executable it is binded to. It correctly shows that port 80 is open when I'm not running WampServer, and when I'm running it, that port 80 is binded to "wamp\bin\apache\apache2.2.8\bin\httpd.exe".

Any other tip?

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: psn (---.tbcn.telia.com)
Date: April 04, 2008 09:36PM

Have you tried port 8080 instead?

Regards/Per

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 05, 2008 04:45AM

Port 80 and 8080 doesn't work to connect to. But when changing the port in Apache's httpd.conf to 86 it works. Is it possible that another program like a download manager stops the connection to 80 or 8080?

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: toivo (---.belrs4.nsw.optusnet.com.au)
Date: April 05, 2008 04:58AM

Hi,

netstat -ab | more

...is your friend.

Skype seems to be a frequent offender in the port 80 front, plus your average antivirus and internet security products.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 05, 2008 07:47AM

It still states that port 80 is unused.

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 05, 2008 07:58AM

Update:
localhost:86 - Doesn't work
127.0.0.1:86 - Does work

127.0.0.1:80 - Can't connect to the server
localhost:80 - My internet gets screwed, doesn't even get an error, it just sits there and tries to connect

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 05, 2008 08:03AM

Update #2:
Fixed it... somehow...

I've removed the open ports in the router and changed this in Apache's httpd.conf:
* Listen = 127.0.0.1:80
* ServerName = 127.0.0.1:80

Now both 127.0.0.1 AND localhost works perfectly.

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: Deimon (---.telia.com)
Date: April 05, 2008 08:05AM

Update #3:
Sorry, localhost still doesn't seems to work. And my hosts file is correct:
127.0.0.1 localhost

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: raid (---.ub.ro)
Date: April 11, 2008 12:03PM

I solved the problem while using skype changing all 80 ports (are 3) to 8080 on httpd.conf

thx

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: yfastud (Moderator)
Date: April 11, 2008 02:11PM

It's not really a good move since now you have to use url:port instead you should change port for skype

Skype uses same port as Apache, so you need to setup skype using different port as follows File -> Options -> Connection -> Uncheck "Use port 80 as an alternative for..."

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: captainbeef (---.dyn.iinet.net.au)
Date: April 13, 2008 02:57AM

Just wanted to say big thanks for the Skype tip, it has solved my problem
I've been struggling with the localhost binding issue for a while now.

nice.....

Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: yfastud (Moderator)
Date: April 13, 2008 05:35AM


Options: ReplyQuote
Re: Can't connect to Localhost
Posted by: larryg (---.dhcp.bycy.mi.charter.com)
Date: April 15, 2008 11:11PM

I'd also like to chime in and thank you for the Skype fix. I have three XP PCs, and only one would not run WAMP - the one running Skype. I was running out of troubleshooting tricks here and don't think I ever would have thought to unload Skyp and see if WAMP ran.

I have experimented and learned that if you pre-load WAMP as part of the Windows boot routine, you can manually start Skype later.

As long as WAMP runs first, everybody's happy.

Thanks again,

-larry

Options: ReplyQuote


Sorry, only registered users may post in this forum.