I was trying to install XAMPP on a friend’s Windows 7 laptop. First, it gave me the error message that it could not install to C:\xampp
as the folder was not empty. I had a look at the folder and it contains the following subfolders:
- apache
- mailoutput
- mailtodisk
- mysql
- php
- tmp
So, I thought to myself, maybe XAMPP is already installed. I checked http://localhost
, and it gave me a page full of ads, which isn’t normal for XAMPP. In fact http://localhost/ANYTHING
gives me a page full of ads. Viewing source on that page gives a complete blank. I do not understand how that is possible.
I asked my friend, whose laptop it is, and she has vague recollections of installing some sort of WAMP server from a USB stick. I tried renaming C:\xampp
as C:\_xampp
, but the existing localhost is unaffected. I looked through the list of programs in Control Panel > Remove Programs, but couldn’t see any reference to Apache, XAMPP, PHP. or anything with a similar name. There is a program called “MySQL Installer”, but that’s probably not relevant.
How can I find and remove the existing webserver, so I can replace it with XAMPP?
Best Answer
Maybe, some spyware or adware modified the hosts file in order to redirect
localhost
to some custom URI/IP. You can find the file here:The file shouldn't be very large, in fact, it's only about 20 lines long (incl. comments) in the default version.
If you have a XAMPP installation on your PC, you can also quickly test whether another program is listening on port 80: