Solved

Error when running Apache

Posted on 2004-09-19
14
954 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
ID: 12097615
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
ID: 12097634
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
ID: 12097728
Which operating system are you using, do you have root-priveliges on that machine?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

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

Expert Comment

by:hernst42
ID: 12097776
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
ID: 12097790
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
ID: 12097894
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
 

Author Comment

by:kara334
ID: 12097944
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
ID: 12097996
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
ID: 12098518
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:Richard Quadling
ID: 12109832
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
ID: 12110340
>  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
ID: 12262051
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
ID: 12262356
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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

770 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