Written by Marco Conti Thursday, 14 May 2009 00:00
My Windows Vista machine recently "forgot " that when I type "localhost" in my browser it would really be a good idea if I could get to my XAMPP homepage.
I have recently switched users in windows and when I went to use my local Apache server to test a database trick I am working on, Firefox was unable to connect to the XAMPP home page.
The error message read something like this: "This site seems valid but the browser was unable to establish a connection".
Naturally, the first thing I did was to Google the error message (Adding XAMPP to the query) and the second result took me to a forum post in the XAMPP web site where some other poor fellow was complaining that he was unable to reach the "http://localhost" address, but when he tried http://127.0.0.1 the XAMPP home page came up without issues.
Sure enough, I tried the same thing and XAMPP came up in all its glory (which is not much, but a welcome sight nonetheless).
He had a couple of responses, one leading him to another post on the same forum. That's where things got interesting.
Here is the post in its entirety:
Open C:\Windows\system32\drivers\etc\Hosts file in your notepad by right clicking on notepad and selecting run as administrator.
Check that you have this entry at the top of the list of uncommented entries.
127.0.0.1 localhost
If not then add the line as the first line in the list.
If you find this entry:
::1 localhost
then comment it out so it looks like this
# ::1 localhost
Save the file and try to access http://localhost again
After reading it, I did just that and after opening the host file I was able to pull up http://localhost just fine. A minor miracle considering how badly the rest of the day was going.
I hope this post will help someone with the same problem. The forum post sure helped me and many thanks to the OP, but I know that for these kind of tips the more times it is repeated the better.
| < Prev | Next > |
|---|
Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.