Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: April 27, 2012 05:46PM

Hi everyone!
I did search for this problem entire forum and the web but so far no help.
I'm new to Apache. Installed wamp package on win 7ultimate without any problem. Icon is green.
Skype is set to use anything but port 80 and 410. IIS not enabled. Netstat shows wampapache is listening on
port 80. I still tried to change conf to listen on different ports( i made changes in 2 places in config file) still same error. I set it back to port 80. No errors in error log and no records in access log. Can't find anything similar to my problem to resolve it.
Can someone Help, please.

Thank you!!!

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: April 30, 2012 01:49PM

Have you also checked your HOSTS file

C:/windows/systems32/drivers/etc/hosts


It should have this line in it ( not commented )

127.0.0.1 localhost

If you see this line, without a comment

::1 localhost

either comment it out (add a # in col1) or remove it completely.

This is a IPV6 version of localhost and is not really required yet, but MS decided to be ready for IPV6 and add it to the hosts file.


IMPORTANT NOTE:
The hosts file is protected by the OS. In order to edit it you must open your editor using the "Run as Administrator" option.
To see this option do the following:
Shift+Right click your editor icon (notepad if thats all you have) and a menu will appear with "Run as Administrator" on it. Click that menu item to launch your editor and then navigate to the above location to edit the hosts file.

Hope this helps

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: April 30, 2012 11:11PM

Yes, I checked hosts file before and left only one line: 127.0.0.1 localhost
I checked all help I can find on wampserver and it all no use so far.
The wamp is green, I can stop or start the server. Also when I test port 80, telnet returns "Your port 80 is not actually in use", but at the same time netstat shows the wampmanager listening on port 80.
This is going on for 2 weeks. I tried to install apache as stand alone and remove /install wamp again. Same thing "unable to connect to localhost". The OS is win 7, 32 bit ultimate. Eset and firewall have exception for wamp. I'm lost don't know what to do.

Hope this can be fixed and I won't have to install linux on separate partition in order to run apache.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: tiredoftrying (65.39.129.---)
Date: May 01, 2012 08:25AM

I am using window7,

I have tried a lot of options and still no luck..

this is what i see in my c:/windows/system32/drivers/etc = Imhost

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to computernames
# (NetBIOS) names. Each entry should be kept on an individual line.
# The IP address should be placed in the first column followed by the
# corresponding computername. The address and the computername
# should be separated by at least one space or tab. The "#" character
# is generally used to denote the start of a comment (see the exceptions
# below).
#
# This file is compatible with Microsoft LAN Manager 2.x TCP/IP lmhosts
# files and offers the following extensions:
#
# #PRE
# #DOM:<domain>
# #INCLUDE <filename>
# #BEGIN_ALTERNATE
# #END_ALTERNATE
# \0xnn (non-printing character support)
#
# Following any entry in the file with the characters "#PRE" will cause
# the entry to be preloaded into the name cache. By default, entries are
# not preloaded, but are parsed only after dynamic name resolution fails.
#
# Following an entry with the "#DOM:<domain>" tag will associate the
# entry with the domain specified by <domain>. This affects how the
# browser and logon services behave in TCP/IP environments. To preload
# the host name associated with #DOM entry, it is necessary to also add a
# #PRE to the line. The <domain> is always preloaded although it will not
# be shown when the name cache is viewed.
#
# Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT)
# software to seek the specified <filename> and parse it as if it were
# local. <filename> is generally a UNC-based name, allowing a
# centralized lmhosts file to be maintained on a server.
# It is ALWAYS necessary to provide a mapping for the IP address of the
# server prior to the #INCLUDE. This mapping must use the #PRE directive.
# In addtion the share "public" in the example below must be in the
# LanManServer list of "NullSessionShares" in order for client machines to
# be able to read the lmhosts file successfully. This key is under
# \machine\system\currentcontrolset\services\lanmanserver\parameters\nullsessionshares
# in the registry. Simply add "public" to the list found there.
#
# The #BEGIN_ and #END_ALTERNATE keywords allow multiple #INCLUDE
# statements to be grouped together. Any single successful include
# will cause the group to succeed.
#
# Finally, non-printing characters can be embedded in mappings by
# first surrounding the NetBIOS name in quotations, then using the
# \0xnn notation to specify a hex value for a non-printing character.
#
# The following example illustrates all of these extensions:
#
# 102.54.94.97 rhino #PRE #DOM:networking #net group's DC
# 102.54.94.102 "appname \0x14" #special app server
# 102.54.94.123 popular #PRE #source server
# 102.54.94.117 localsrv #PRE #needed for the include
#
# #BEGIN_ALTERNATE
# #INCLUDE \\localsrv\public\lmhosts
# #INCLUDE \\rhino\public\lmhosts
# #END_ALTERNATE
#
# In the above example, the "appname" server contains a special
# character in its name, the "popular" and "localsrv" server names are
# preloaded, and the "rhino" server name is specified so it can be used
# to later #INCLUDE a centrally maintained lmhosts file if the "localsrv"
# system is unavailable.
#
# Note that the whole file is parsed including comments on each lookup,
# so keeping the number of comments to a minimum will improve performance.
# Therefore it is not advisable to simply add lmhosts file entries onto the
# end of this file.




PLEASE I NEED HELP ON HOW TO GET WAMPSERVER., LOCALHOST WORKING.....THANKS IN ADVANCE.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: May 02, 2012 01:08AM

Attn: tiredoftrying.
I don't get it, why you trying looking at "lmhosts" file. It should be "hosts" file with only one line in it:
127.0.0.1 localhost
the rest is commented out with sign "#" or you can delete all commented lines.
and remember this file has no ".txt" extension.
Hope it will help.
Unfortunately nobody with experience responding to my problem.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: May 02, 2012 03:40PM

magap,

If wampmanager is running and GREEN and you run wampmanager->apache->services->test port 80 it should say something like:

Your port 80 is actually used by :
Server: Apache/2.2.xx (Win32) PHP/5.3.y

Check that the services wampapache and wampmysql are running in windows services.

Have a look in the windows event viewer for any messages from any kind of apache service to see if that leads you to your problem.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: May 02, 2012 10:34PM

Thank you for response,
Wamp is green but test port 80 returns "your port 80 is not actually in use"
wampapache and wampmysqld are running as i can see in task manager. If i stop apache the wampapache disappears. Nothing about apache or wamp i see in event viewer. Also netstat test returns wampapache is listening on port 80.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: May 02, 2012 10:48PM

Have you changed the Listen parameter in httpd.ini to another port?

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: May 02, 2012 11:33PM

If you mean httpd.conf then yes I did try 8080 and 410 but because of the same problem I put it back to port 80. I don't have any initialization file for httpd except httpd.conf

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: May 03, 2012 12:53AM

Yea my bad spelling httpd.conf is what I meant.

Did you try installing apache and mysql some other way before installing wamp?

If so make sure that that install is completely removed

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: May 03, 2012 02:23AM

I did try to install apache/php/mysql from apache.org but it had the same problem. so i decided to give a try to wamp. Yes, I uninstalled it using cp, and don't see any other instances running in task manager.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: May 03, 2012 11:52AM

Are you sure you have checked Windows Event Viewer -> Windows Logs -> Applications

for anything in the 'Source' column from 'Apache Service'

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: magap (---.dyn.optonline.net)
Date: May 03, 2012 08:07PM

I just went line by line through Windows Event Viewer -> Windows Logs -> Applications
There total 69 events for today's date and nothing about 'Apache Service' in the source column.
I can see MySql event a few times. I also checked Security and System in the Event Viewer but nothing related to Apache Service.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: moohebat (175.136.165.---)
Date: August 23, 2012 07:27AM

Exactly I have this problem. WAMP server icon is green. I do not have Skype or IIS on my pc. My windows is 7 (x86). I did all advices which you have mentioned but when I want to load localhost it bring nothing and it seems that browsers cannot reach to anything and the page is blank! I installed WAMP server yesterday at my PC at university without any problem (Windows7 64bit). But at home I could not. Only Apachi is using port 80, I checked it with netstat. However when I test port 80 by Apachi command it says a program is using port 80. It seems it cannot detect itself. It is very strange! What is the solution? I lost a lot of time for this ridiculous problem.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: stevenmartin99 (Moderator)
Date: August 23, 2012 07:32AM

It's not wamps problem.

3 things it could be

1. Try http:/ /127.0.01 in your broswer -if that works , it's your hosts file.

2. Your firewall is blocking the transfer of information on the port

3. You've had a bad virus that has destroyed winsock and firewall components

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 08/23/2012 07:34AM by stevenmartin99.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: Gordon Bennette (---.range86-176.btcentralplus.com)
Date: August 23, 2012 07:05PM

Same problem here - unable to connect to server & the Icon is orange.
My system is running Windows 7.
The WAMP version is 2.2
I have edited the hosts file so that the only line in it is:
127.0.0.1 localhost
When I test port 80 I get the message that it is not availble (might be Skype). - Skype is not on my computer!

I have tried editing the httpd.conf file line to Listen 8080 & also tried 81
When I try to to start the local host firefox gives the message: The connection was reset The connection to the server was reset while the page was loading.

I have installed Visual C++ 2010 x86

I have added the wamp directory to the exception list on my internet security package

Any suggestions?

Many thanks

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: BobKinloch (178.156.31.---)
Date: August 23, 2012 11:52PM

Just installed wamp and had same problem, removed strange entry in file and it all works..

A good test is to open the command prompt and 'ping localhost' and you will get a reply from 127.0.0.1 if you dont your HOST file is wrong



Edited 1 time(s). Last edit at 08/23/2012 11:54PM by BobKinloch.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: Gordon Bennette (---.range86-176.btcentralplus.com)
Date: August 24, 2012 10:55AM

pinged local host three times & got the replies.

note on my earlier post: it is the 32 bit version that I am trying to get running.

I have just completely uninstalled & then reinstalled wamp server2.2 No change in the problem.
Suggestions please.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: Gordon Bennette (---.range86-176.btcentralplus.com)
Date: August 24, 2012 11:11AM

Further update:
I have just successfully tried to install wampserver 2.2 on my 64bit windows 7 OS.
No problems It installed just like it's supposed to. The problems with the 32bit system remain a mystery.

Options: ReplyQuote
Re: Unable to connet to localhost
Posted by: Gordon Bennette (---.range86-176.btcentralplus.com)
Date: August 26, 2012 10:17AM

Last Update:
It is now working on my 32bit system!
Sp how was it done - I don't really know.
I had previously edited the host file.
This time after completely uninstalling the programme I installed to a directory I called wamp2 & in the installation procedure Iticked both of the options on the fire wall page (previously I'd only checked the home installation). The programme then started AND WORKED!!!
If this makes sense to you it doesn't to me. Still never look a gift horse in the mouth.

Options: ReplyQuote


Sorry, only registered users may post in this forum.