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.
I am using: Windows 7 64bit; Zend Server CE 5.5.0
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 184.108.40.206:80 CLOSE_WAIT 2552
PID:2552 is “rundll32.exe *32″ in my task manager. The second saying:
TCP 192.168.0.7:50205 220.127.116.11: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.
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
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.
- Get pid that is listening port 80: netstat -nao | find “:80″
- Open task manager, go to processes tab and check “PID” on menu/view/Select Columns…. then you can find out the procress with
- If it is a normal application or IIS, just disable or uninstall it.
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
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.