Error: Could not bind to address 80

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

Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 14:39

Please forgive me if I am asking a question that has been answered many time before but I have tried several searches of this forum without finding any relevant solution. I am totally new to the world of open source software, PHP, Apache, Perl, etc, and have only downloaded XAMPP for Windows to meet one very specific purpose. Any suggestions will therefore have to be spelled out in detail!

I had XAMPP running sucessfully on my Windows 7 Ultimate 64-bit PC a couple of days ago but today Apache refuses to start. When I click on the Apache Start button in the XAMPP Control Panel the window at the bottom says 'Apache started'. However, the Start button does not change to a Stop button and my XAMPP-dependent application does not work. Note that I am running XAMPP as administrator.

I checked the Apache error.log file and found the following:
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


How do I fix this?

In case it is relevant, I ran netstat -ano (as advised on another thread in this forum) and got the result that address 80 was listening on PID 4, whatever that may mean!

David
Last edited by haggis999 on 30. November 2010 14:52, edited 1 time in total.
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby JonB » 30. November 2010 14:50

99% chance - Another application or service is using port 80.

Use the XAMPP Control Panel - BEFORE you try to start Apache (if it is set as a service - disable that & reboot) - now run Port Check -

If an application or service is listed - that's your problem, you will need a fix specific to that application/service... Could be Skype, IIS7, or http.sys (most common problems)

also take a look at this FAQ - it has more hints and fixes and a link to troubleshooting Port 80 on Windows 7

http://bravo.newnetenterprises.com/word ... art-helppp


Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 15:01

Hi Jon,
First of all, please note that I have edited my original post to add some more details that you may not have seen while you were creating your response.

I have now run Port-Check as you suggested. The relevant result would appear to be as follows:

Service Port Status
===================================
Apache (HTTP) 80 Process: System

Is that a problem? If so, what should I do next?

I will also have a look at your FAQ link. Thanks for your help.

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby JonB » 30. November 2010 15:09

here's the link for Port 80 on Win 7 - its one of the items in the FAQ -

http://www.shishirrao.net/blog/2010/03/ ... -7-port80/

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 15:09

I'm not running Skype and I am not knowingly running IIS7. I do have SQL Server 2008 Developer Edition installed but your referenced FAQ seems to suggest that SQL Server is only a likely culprit if the response to netstat -ano does not list PID 4 against port 80.

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 15:12

I've found some suggestions for the PID 4 situation in your link. Will let you know if any of them work. Thanks.

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby JonB » 30. November 2010 15:30

Process ID's are not fixed - that's the whole deal. When a process is started its 'stamped' so it can be tracked. Google 'Process Explorer' - :shock:

http://msdn.microsoft.com/en-us/library/ms684868(VS.85).aspx

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 15:56

Jon,
I think I have now tried all the solutions listed in your previous references. None of them work!

To be specific, I tried the following:
1. Disable RemoteDesktopManager in Services - no such service listed on my machine
2. Create new NoRun item with value of 1 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3. Change value of Start item in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP from 3 to 0

All I can think of now is to try and change the port used by Apache.

BTW, the link in your last post does not work for me. EDIT: It works now. I hadn't picked up the aspx suffix!

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 17:20

Jon,
Problem is now fixed!

One of your links contains this link to the site that provided the solution:
http://www.cameroncooke.com/2009/01/25/ ... -solution/

The solutions suggested by the original Cameron Cooke article did not work but something from the long list of comments by other people did the trick. Here is an edited quote:

If it is System process (PID 4), you need to disable HTTP.sys driver which is started on demand by another service, such as Windows Remote Management/Print Spooler on Windows 7. There are two ways to disable it:
1. Go to Device Manager, select “Show hidden devices” from Menu/View, go to “Non-Plug and Play Driver”/HTTP and disable it. Then reboot.
2. Launch RegEdit and go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP. Change the value of ‘start’ to 4 (disabled) then reboot.


I can now start Apache from XAMPP. Thanks for pointing me in the right direction!

Regards,
David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 19:24

I think I may have been a little hasty in saying that my problem was fixed....

I had noticed the reference to the http.sys driver being required by the "Windows Remote Management/Print Spooler" but assumed that this applied to some obscure remote access to my PC and/or printer and was thus not relevant to my use of a locally attached printer. My assumption may be wrong because my printer has stopped working ever since I disabled http.sys :cry:

Can anyone confirm that a local USB-connected printer requires http.sys? If so, I am once again looking at the possibility of changing the port used by Apache - in the hope that this doesn't break something else!

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 20:09

Re-enabling http.sys has indeed allowed my printer to work again.

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby haggis999 » 30. November 2010 22:29

I have now changed the port used by Apache from 80 to 8666 by changing the line 'Listen 80' to 'Listen 8666' in the ..\XAMPP\Apache\conf\httpd.conf file. This procedure was also buried in the long list of comments in the previously mentioned Cameron Cooke link (look for a post by 'skeptigator'). Port 8666 is a random choice. Apparently, it could be any number above 1024.

This now means that I have to use http://localhost:8666 in order to access XAMPP but that's no big deal.

I hesitate to say this again but I think my problem is now fixed.

David
haggis999
 
Posts: 9
Joined: 30. November 2010 14:10

Re: Error: Could not bind to address 80

Postby Sharley » 01. December 2010 01:18

haggis999 wrote:...and I am not knowingly running IIS7...
Different name now - World Wide Publishing service.

See if this IIS Forum topic helps:
how to turn off iis 7
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 149 guests