Solved

Error when running Apache

Posted on 2004-09-19
14
949 Views
Last Modified: 2013-12-13
Hi,

I think I've installed PHP and Apache correctly, but when I run Apache I ge the following error message:

Only one usage of each socked address is normally permitted. make_socket could not bind to address 0.0.0.0.80
no listing sockets available. Shutting down. Unable to open logs.

How do I get Apache to run correctly?


Thanks.

Kara
0
Comment
Question by:kara334
14 Comments
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
Are you sure there is no other programm/apache is running that also uses port 80
to see if there is a process running do a:
netstat -an | grep 80
If there is another process a line like
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
will be printed.
0
 

Author Comment

by:kara334
Comment Utility
Thank you for trying to help, but I'm new to all this "port" stuff. Could you please explain what you just said in English? :)

Thanks.
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
Which operating system are you using, do you have root-priveliges on that machine?
0
 

Author Comment

by:kara334
Comment Utility
I'm using Windows XP. I don't know what root-priveliges are.
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
Open a command-shell (start -> Execute Command to run cmd.exe)
After you that shell typ
netstat -an
the you will see which port are use. if there is already a webserver running (like IIS) a line like
  TCP 0.0.0.0:80   .... LISTENING

will be shown. So to start apache you need to shutdown the other webserver that is running.
0
 

Author Comment

by:kara334
Comment Utility
Yes, I got that result. I think the other webserver is for ASP.net. How do I shut it down?

Thanks
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
from the command-shell use
net stop iisadmin

To make that permanent got to the administration panel -> services and disable the autostart of WWW-publishing and IIS-admin
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:kara334
Comment Utility
I couldn't find either of those under Services. And I actually uninstalled WebMatrix because I don't think I'm going to need it. But something is still blocking Port 80. I saw something under Services that said WebClient. Sounds important. Could that be it? What else could it be?

Thanks.
0
 
LVL 5

Expert Comment

by:TheClickMaster
Comment Utility
To see what program is blocking your port 80 do this:

1) Start->Execute->cmd.exe

2) Type: netstat -ano

3) Now there will be a column called PID where you see the process ID of all the programs

4) Take note of the PID of the program that listens on port 80

5) Type: tasklist /FI "PID eq ?"  but replace ? by the PID

6) The name of the program or service that uses port 80 will be displayed

0
 

Author Comment

by:kara334
Comment Utility
Thank you ClickMaster.

I did what you said and came up with "tasklist." But a search found no tasklist in the computer. Do I need to turn off "task monitor" under Services, or is tasklist something else?

0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
tasklist.exe is in C:\WINDOWS\SYSTEM32 (On my Win XP Pro SP2).

How about this idea.

1 - Load up a browser.

2 - enter an address of localhost or 127.0.0.1

If you get ANYTHING other than the browser saying nothing could be found, you are already running a webserver of some sort.

If you get something but not really sure what, try...

1 - Load a command prompt.

2 - Type: telnet

3 - In telnet, type: SET LOCALECHO

4 - In telnet, type: open 127.0.0.1 80

5 - In telnet, type: GET /[CR][CR]

6 - That is GET / followed by 2 carriage returns/enters.

You may need to scroll to the top of the window (if you have no scroll bars, alter the properties of the CMD window by increasing the Screen Buffer Size in Layout - you will need to rerun this to see the top if you could not scroll up to see the top).

I get ...

HTTP/1.1 200 OK
Date: Tue, 21 Sep 2004 07:28:58 GMT
Server: SAMBAR
Connection: close
Content-type: text/html

I am running Sambar Server.

You may get something else for Server (if you get anything at all!).

Richard.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
>  I'm using Windows XP
not shure for XP, but most other M$ versions bind IIS (or whetever they think is related) to 0.0.0.0:80 by default.
And obviously there is no GUI to change that (does anybody really need that?-)

here is a workaround (working on w2k):
cd C:\Inetpub\AdminScripts
cscript adsutil.vbs set w3svc/disablesocketpooling true
# then setting an IP in GUI works
0
 

Author Comment

by:kara334
Comment Utility
Hi,

I know it's been awhile....busy with my day job and such. I tried what RQuadling suggested and got "could not open connection to the host, on port 23"

Also, I don't have a tasklist.exe in my System 32 folder.

Does anyone have any idea what could be blocking my Apache server?


Thanks.

Kara
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
Comment Utility
Download tcpview from http://www.sysinternals.com/ntw2k/source/tcpview.shtml

that will show you which ports are opend by which programm. So look which programm has opened the http-port in the column "Local Adress"

e.g. inetinfo.exe is the IIS-Server
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now