I was trying to install Zend Server CE on my computer so I could run PHP code on my computer but when it got to the point were I need to choose the port for my Web Server uses it says: "This port is in use. Specify a new Apache port and click Next to continue" and below it says: "Web Server Port: 80 Occupied". I have Skype installed but I told it not to use Port 80 or Port 443. So I decided to check what is using Port 80 and I go to CMD and type: "netstat -o -n -a | findstr 0.0:80" and then CMD outputs:

TCP     0.0.0.0:80     0.0.0.0:0     LISTENING     4

I check for PID:4 in Task Manager's Processes and Services. Seems PID 4 is "System".

So, what I want to know is how can I stop PID:4 from using Port 80 and get Zend Server CE installed with default settings, or (if its not important that Zend Server CE uses port 80) what port do I use.

INFO: I am using: Windows 7 64bit; Zend Server CE 5.5.0

EDIT: Now in CMD instead of typing "netstat -o -n -a | findstr 0.0:80" I removed the 0.0 and just typed "netstat -o -n -a | findstr :80" and I got a bigger list and only two processes on the list showed up on my Task Manager. The first one said:

TCP     192.168.0.7:49400     209.73.188.22:80     CLOSE_WAIT      2552

PID:2552 is "rundll32.exe *32" in my task manager. The second saying:

TCP     192.168.0.7:50205     65.195.187.57:80     ESTABLISHED     3092

PID:3092 is one of many "chrome.exe *32" which is Google Chrome. I completely closed Google Chrome and tried again but it did not work.

EDIT: I ran a netstat for everything that is LISTENING to port 80 (netstat -o -n -a | findstr LISTENING | findstr :80). Here are the results:

TCP     0.0.0.0:80     0.0.0.0:0     LISTENING     4
TCP     [::]:80        [::]:0        LISTENING     4
link|improve this question
Wouldn't hurt to telnet a "GET / HTTP/1.1" to 127.0.0.1 and see what comes up. – ultrasawblade Oct 30 '11 at 3:18
@ultrasawblade How exactly do I do that? – CyberOPS Oct 30 '11 at 3:28
Run telnet 127.0.0.1 80 and then past that line in and press enter twice. If you're running Windows 7, you need to install telnet client from "add and remove Windows features" first. – billc.cn Oct 30 '11 at 22:35
feedback

3 Answers

up vote 3 down vote accepted

Ok, after searching the web for a while I found a solution to my problem. I am going to post it here for others who visit this page looking for a solution to the same or similar problem.

Just follow these steps to diagnose and resolve your issue.

  1. Get pid that is listening port 80: netstat -nao | find “:80″
  2. Open task manager, go to processes tab and check “PID” on menu/view/Select Columns…. then you can find out the procress with that pid.
  3. If it is a normal application or IIS, just disable or uninstall it.
  4. If it is System progress(PID 4), you need to disable HTTP.sys driver which is started on demand by other service, such as Windows Remote Management/Print Spooler on Windows 2008 or Windows 7. there is two way to disable it:

    • a. 1) Go to device manager, select “show hidden devices” from menu/view, go to “Non-Plug and Play Driver”/HTTP, double click it to disable it (and disable or manual some services depended on it). 2) Reboot and use netstat -nao | find “:80″ to check if 80 is still used.

    • b. 1) Launch RegEdit 2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP 3) Change the value of ’start’ to 4 (disabled) 4) Re-boot your computer

My solutions was doing part b of step 4.

link|improve this answer
After seeing a ton of answers on SO and SU - this is the only one that worked. I disabled everything else, and http.sys was still screwing around, and I didn't really want to make a registry change because I'd probable forget where it lived, so option 1 really helped me out. No reboot necessary. – AndrewPK Apr 18 at 16:21
feedback

PID 4 is hard coded to be the "System" process which is part of the system kernel.

If the port is occupied by the system, you probably had IIS enabled. See http://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that

link|improve this answer
I have uninstalled IIS 7.5 Express thinking that would help. Maybe I have to restart? I am going to try that. – CyberOPS Oct 30 '11 at 3:05
Nope. Problem still persists. – CyberOPS Oct 30 '11 at 3:19
Do you have IIS 7.0 (the one shipped with Windows 7) installed as well? Normally if you just stop w3svc, the port will be closed. – billc.cn Oct 30 '11 at 13:34
Nope. And as far as I know, I shouldn't have any other webservers installed either. – CyberOPS Oct 30 '11 at 20:52
Could you run netstat again but only post the ports that are LISTENING? – billc.cn Oct 30 '11 at 21:12
show 3 more comments
feedback

I have been looking for a solution for why I could not get XACT 2.0 working on Windows 7 64 bit for days. I had got as far as realising I needed to free up port 80 but could not find a way to do this, which gave me the results I required. That last bit of DOS is it;

netstat -nao | find “:80″

Also point two the SYS REG stuff...

use this and enable PID in task manager. This answer worked... finally. Not only that, I realised that despite deselecting port 80 and 443 in Skype, Skype was still using port 80... naughty little VOIP. Anyway, thank you for the answer. Mucho respect.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.