Page 1 of 1

Error: Could not bind to address 80

PostPosted: 30. November 2010 14:39
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 14:50
by JonB
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)

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:01
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:09
by JonB
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)

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:09
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:12
by haggis999
I've found some suggestions for the PID 4 situation in your link. Will let you know if any of them work. Thanks.

David

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:30
by JonB
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
:)

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 15:56
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 17:20
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 19:24
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 20:09
by haggis999
Re-enabling http.sys has indeed allowed my printer to work again.

David

Re: Error: Could not bind to address 80

PostPosted: 30. November 2010 22:29
by haggis999
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

Re: Error: Could not bind to address 80

PostPosted: 01. December 2010 01:18
by Sharley
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