"Localhost" not working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

"Localhost" not working

Postby Nick_Q » 16. August 2007 12:33

Hi all,

Newbie - so I am hoping that this is a straightforward question as I seem to be going round in circles :?

Having just installed xampp version 1.6.3a (and overcome conflicts with skype and IIS concerning port 80!) with apache running ok

Running on Windows XP Pro

I can now get to the home page using http://127.0.0.1 however I can NOT get to anything using http://localhost - what have i missed?
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby KingCrunch » 16. August 2007 12:35

Maybe corrupt HOSTS-File? windows\system32\drivers\etc (or something like that)
Nicht jeder Fehler ist ein Bug ...
KingCrunch
 
Posts: 1724
Joined: 26. November 2005 19:25

Postby Nick_Q » 16. August 2007 13:28

Hi thanks for the response, I have downloaded and reloaded XAMPP twice with the same results so I am pretty sure it is not xampp.

so if is it nothing you would expect me to need to alter in the xampp config files then it may be a curruption as you say...

How would I go about checking ? In windows/system32/ i only have hostname.exe plus some hostmib files...
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby RedXIII » 16. August 2007 22:54

Go to \WINDOWS\system32\drivers\etc and open hosts in a text editor.

You should see this line in it. If you don't see it, make sure to add it.
127.0.0.1 localhost
RedXIII
 
Posts: 6
Joined: 09. August 2007 10:23

Postby Nick_Q » 17. August 2007 08:28

RedXIII wrote:Go to \WINDOWS\system32\drivers\etc and open hosts in a text editor.

You should see this line in it. If you don't see it, make sure to add it.
127.0.0.1 localhost


Hi RedXIII,

Thank you for this, KingCrunch was absolutely right, there is no such line in the hosts file. however there is a load of "other" entries there which do not make sense - I now understand these are added by my spyware program to redirect calls from my m/c to "bad" sites back to 127.0.0.1?


However, now the Localhost line IS included but still no connection...what else do I need to do??

The other thing I have noticed is that when searching for localhost the CPU usage goes to 100%!
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby Izzy » 17. August 2007 10:16

You could try adding this:

Win32DisableAcceptEx

to the end of your xampp\apache\conf\httpd.conf file if it is not there already, save it and then restart Apache.

Always make a backup of your conf files before editing in case you make a typo.

Also check your apache log files as there may be a clue there.
xampp\apache\logs\error.log

I now understand these are added by my spyware program to redirect calls from my m/c to "bad" sites back to 127.0.0.1?

This redirect to 127.0.0.1 I am not sure about as localhost is 127.0.0.1 and you are having issues with localhost.

Maybe try and cut those out of the hosts file and try loading localhost again.

You can always paste them back in again if it makes no difference.

BTW the 127.0.0.1 localhost line in the hosts file may be better if it was the first line.

=================================================
Take a look at the new DeskTopXampp launch control posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967

The DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
is available here:
http://zedfiles.com/DTX/

I highly recommend DTX.
=================================================
Last edited by Izzy on 02. September 2007 04:11, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Nick_Q » 17. August 2007 10:44

Izzy wrote:You could try adding this:

Win32DisableAcceptEx

to the end of your xampp\apache\conf\httpd.conf file if it is not there already, save it and then restart Apache.

Always make a backup of your conf files before editing in case you make a typo.

Also check your apache log files as there may be a clue there.
xampp\apache\logs\error.log

I now understand these are added by my spyware program to redirect calls from my m/c to "bad" sites back to 127.0.0.1?

This redirect to 127.0.0.1 I am not sure about as localhost is 127.0.0.1 and you are having issues with localhost.

Maybe try and cut those out of the hosts file and try loading localhost again.

You can always paste them back in again if it makes no difference.

BTW the 127.0.0.1 localhost line in the hosts file may be better if it was the first line.


Hi Izzy,

Thank you for the reply...

I did as you suggested and included the stop for AcceptEx, I am also exiting the Control panel module which I see is also recommended by some - no difference i'm afraid. Localhost still not connecting and the cpu usage jumps to near 100% whilst it it trying!

Here is the the log entry:


[Fri Aug 17 10:34:36 2007] [notice] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3 configured -- resuming normal operations
[Fri Aug 17 10:34:36 2007] [notice] Server built: Mar 5 2007 11:23:00
[Fri Aug 17 10:34:36 2007] [notice] Parent: Created child process 2996
[Fri Aug 17 10:34:36 2007] [notice] Disabled use of AcceptEx() WinSock2 API
[Fri Aug 17 10:34:37 2007] [notice] Child 2996: Child process is running
[Fri Aug 17 10:34:37 2007] [notice] Child 2996: Acquired the start mutex.
[Fri Aug 17 10:34:37 2007] [notice] Child 2996: Starting 250 worker threads.
[Fri Aug 17 10:34:37 2007] [notice] Child 2996: Listening on port 443.
[Fri Aug 17 10:34:37 2007] [notice] Child 2996: Listening on port 80.


and i did make sure the "127.0.0.1 localhost" entry is the first line in the "hosts" file.

It just seems like I am going round in circles on this one :cry:
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby Izzy » 17. August 2007 11:20

Is this an issue with your router or firewall, open a port for localhost?

Norton Anti-Virus and NOD32 Anti Virus have been known to cause issues if you are using either, temporary disable.

Also don't know if this old trick might work, it might be worth a try.

Add this to your last httpd.conf file edit so it looks like this:

EnableSendfile Off
EnableMMAP Off
Win32DisableAcceptEx


http://httpd.apache.org/docs/2.3/mod/co ... lesendfile

http://httpd.apache.org/docs/2.3/mod/co ... enablemmap

http://httpd.apache.org/docs/2.3/mod/mp ... leacceptex

When you uninstall XAMPP did you follow the instructions at Step 5 in the xampp\readme_en.txt file?

Before reinstalling XAMPP make sure that no apache services are still running by checking the Windows Task Manager - right click on the task bar and select Task Manager from the context menu then click on the Processes tab and look for any XAMPP services running.

=================================================
Take a look at the new DeskTopXampp launch control posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967

The DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
is available here:
http://zedfiles.com/DTX/

I highly recommend DTX.
=================================================
Last edited by Izzy on 02. September 2007 04:05, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Nick_Q » 18. August 2007 10:47

Izzy wrote:Is this an issue with your router or firewall, open a port for localhost?

Norton Anti-Virus and NOD32 Anti Virus have been known to cause issues if you are using either, temporary disable.

Also don't know if this old trick might work, it might be worth a try.

Add this to your last httpd.conf file edit so it looks like this:

EnableSendfile Off
EnableMMAP Off
Win32DisableAcceptEx


http://httpd.apache.org/docs/2.3/mod/co ... lesendfile

http://httpd.apache.org/docs/2.3/mod/co ... enablemmap

http://httpd.apache.org/docs/2.3/mod/mp ... leacceptex

When you uninstall XAMPP did you follow the instructions at Step 5 in the xampp\readme_en.txt file?

Before reinstalling XAMPP make sure that no apache services are still running by checking the Windows Task Manager - right click on the task bar and select Task Manager from the context menu then click on the Processes tab and look for any XAMPP services running.



Hi Izzy,

Many thanks for the suggestions...

I uninstalled all to start once again, including removing the xampp folder as per step 5 (which I had done before but was not sure if I had done it before anything!)

I use NOD32 AV and ZoneAlarm firewall so turned both OFF for the install.

Then I reinstalled 1.6.3a...using the installer option. Same issue I'm afraid. Using Http://127.0.0.1 I go straight to the home xampp page. Using Http://localhost the browser attempts to load, CPU usage goes to c.100% and not a lot else :wink:

I checked in the hosts file and the "127.0.0.1 localhost" is present and first in the list.

This is true even with the Xampp control panel NOT running. (i.e. "exit"ed)

I then edited the httpd.conf file to add the:
EnableSendfile Off
EnableMMAP Off
Win32DisableAcceptEx

stopped apache, restarted apache but still have the same issue - attempting to access http://localhost just locks the process in some kind of loop with CPU activity at c. 100% and the browser left "loading"

Before, on this same m/c I was using version 1.5.4a without a problem?!

Really odd - its got me totally confused... :cry:
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby MicroX » 20. August 2007 21:49

I'm running windows xp pro XAMPP 1.6.3a and have the same problem but with both http://localhost and http://127.0.0.1 .
When i add a s on the http it work fine, like so https://localhost https://127.0.0.1 .
Also i have XAMPP 1.6.3a on windows home and all works fine.
When i get free time i will try reinstalling XAMPP 1.6.3a on windows xp pro see if that helps me.
MicroX
 
Posts: 9
Joined: 25. May 2007 15:08

Postby Nick_Q » 21. August 2007 09:37

MicroX wrote:I'm running windows xp pro XAMPP 1.6.3a and have the same problem but with both http://localhost and http://127.0.0.1 .
When i add a s on the http it work fine, like so https://localhost https://127.0.0.1 .
Also i have XAMPP 1.6.3a on windows home and all works fine.
When i get free time i will try reinstalling XAMPP 1.6.3a on windows xp pro see if that helps me.


Hi MicroX

Check to see what your cpu usage is like - I am not sure still why the usage climbs to near 100% and if that is actually the problem. i.e. if I waited a month it might connect! :?

BTW the Https option makes no difference for me...
Nick_Q
 
Posts: 6
Joined: 16. August 2007 12:24

Postby jm_shoots » 21. August 2007 10:15

same thing comes out when i type my PC's IP addreess and http://127.0.0.1

is it okay?
jm_shoots
 
Posts: 2
Joined: 21. August 2007 05:46

Postby MicroX » 21. August 2007 13:42

My CPU spiked 100% 8 times after the page was loaded. When i tried refreshing the page the CPU did not Spike.
MicroX
 
Posts: 9
Joined: 25. May 2007 15:08


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 156 guests