views:

620

answers:

3

I've gotten a new machine, but it came with Vista. I figured it would be best to wait for W7 before I spent any money on an OS, so I'm stuck with it for now. But I must get my development environment setup, and soon!

My machine came with McAfee, which I'm using for the moment, and I've let port 80 be open and I've given httpd.exe access to the network. (Includes both Windows Firewall & McAfee Firewall.) UAC is off, so that shouldn't be a problem. I am using XAMPP 1.7.0. Aside from these things in this paragraph I have just installed XAMPP.

I get this message:

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs

The application halts directly after this.

So, what pitfall might I have stepped into this time? What permissions must I set and where, and why doesn't deactivating my firewalls give me an open port for apache?

Solution

The problem, when port 80 was taken and IIS was shown inactive, was Skype. By default it takes ports 80 and 443, which can be deactivated via Tools > Options > Advanced > Connection. Uncheck the box and restart Skype to have port 80 back under your control.

A: 

Have you tried opening http://localhost ? What displays? IIS could be installed. Go to the control panel, Programs and Features, "Turn Windows Features On or Off" and make sure that IIS is not installed.

Scott Anderson
A blank result is returned. IIS is deactivated and presumably uninstalled.
The Wicked Flea
+4  A: 

Are you sure nothing else is listening on Port 80?

At a Command Prompt enter:

netstat -oan | findstr LISTENING

If something is listening on Port 80, the number on the far right is the Process ID of the offending application.

I had a similar problem recently which I blamed on Windows 7 and then Firewalls before I remember that Skype will listen on Port 80 before you tell it not to. So it's best to be sure because unexpected things can take up that port.

Dave Webb
Netstat says port 80 is being listened on. I told McAfee to pass 80 through though. How do I find out what is listening to port 80? I may have to switch to 8080, which is free.
The Wicked Flea
Huh, there's no process ID, but I do have Skype! I remember having trouble with that last time I installed it. Updating question now.
The Wicked Flea
@The Wicked Flea: Yes, Skype irritatingly grabs port 80 by default.
R. Bemrose
A: 

What happens when you go to http://127.0.0.1 in your browser?

Most likely the IIS service is running for one reason or another. Also note that localhost resolves to an IPv6 address on Vista, and IIRC xampp is not configured for IPv6 , I ran into a lot of troubles with that.

By default, if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don't have permission. To successfully modify the hosts file, run notepad.exe as an administrator and open the file.

  1. Browse to Start -> All Programs -> Accessories
  2. Right click "Notepad" and select "Run as administrator"
  3. Click "Continue" on the UAC prompt
  4. Click File -> Open
  5. Browse to "C:\Windows\System32\Drivers\etc"
  6. Change the file filter drop down box from "Text Documents (.txt)" to "All Files (.*)"
  7. Select "hosts" and click "Open"
  8. Change the localhost line from: ::1 localhost to: 127.0.0.1 localhost

I realize that this might not fix your problem, but it might save you a lot of headache when developing an IPv4 app that tries to resolve localhost.

Hannson
Same as http://localhost/, which is a blank page. (A 0-byte length.) IIS is deactivated as well. (See Dave's answer for port 80 being listened too.)
The Wicked Flea