suraj mahajan
suraj mahajan

Reputation: 870

Error with starting apache with port number 80

When starting my apache server with port number 80. i am using XAMPP. on my conputer not installed IIS. when i am trying diffrent port number XAMPP control panel opened, but phpMyadmin is not working properlly. guys plz tell me that where is actually engaged that port 80

4:13:16 PM [Apache] Problem detected!

4:13:16 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!

4:13:16 PM [Apache] Apache WILL NOT start without the configured ports free!

4:13:16 PM [Apache] You need to uninstall/disable/reconfigure the blocking ap plication

4:13:16 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port

4:13:16 PM [Apache] Attempting to start Apache app...

4:13:17 PM [Apache] Status change detected: running

4:13:20 PM [Apache] Attempting to stop Apache (PID: 2784)

4:13:20 PM [Apache] Attempting to stop Apache (PID: 6376)

4:13:20 PM [Apache] Status change detected: stopped

Upvotes: 0

Views: 4039

Answers (5)

nicos
nicos

Reputation: 128

Open the console (win key+r), type "cmd" and then type "netstat -ano" and check on the second column (local address) the row with :80 (sometings like this 0.0.0.0:80).

In the last column on the right you can find the PID of the process.

Now go to check what service correspond to the PID with CTRL+SHIFT+ESC.

If you are on Win 8, go to Details tab and sort by PID column. You can find the service associated with the PID and can kill it.

Hope this helpful.

EDIT You have found the PID. Your PID is 4. Open the activity control with the combination CTRL+SHIFT+ESC, go to DETAILS tab and find the PID. Right click on the process and the click on Terminate activity.

Upvotes: 3

Thilina Ashen Gamage
Thilina Ashen Gamage

Reputation: 1735

SOLUTION:

On your XAMPP Control Panel, Stop Apache Module, click on Config button, then select Apache (httpd.conf). Find (Ctrl+F) 80 on the file. Replace all 80s with a random value you like (8080 looks good) and save the file. Now click on Config button, then select Apache (httpd-ssl.conf). Find (Ctrl+F) 443 on the file. Replace all 443s with a random value you like (4433 looks good) and save the file. Start the Apache Module again. Now APACHE must work fine :)

NOTE:

If you would like to know the exact reason for this error, open your Task Manager and go to Details tab. Find the process with the PID mentioned on the XAMPP error log. Here what exactly has happened is your port is busy with another process which is indicated by the PID (Process ID). So in the solution, what we did is, allocating another port for APACHE.

ADDITIONAL TIP:

When you type localhost on your browser's address bar, it uses the port 80 by default. But since you make changes to the default ports of Apache Module, make sure you adjust your localhost's address accordingly. For an example, if you change your port 80 to port 8080, you will have to use http://localhost:8080/ all the time on the browser, so that your browser will know Apache is now using port 8080, not the default port.

If you get stuck or would like to learn about the topic, you can find the detailed steps from my blog article: http://ashenlive.blogspot.com/2016/08/web-programming-with-php.html

Upvotes: 1

Surendra Kumar Ahir
Surendra Kumar Ahir

Reputation: 1687

XAMPP - Port 80 in use by “Unable to open process” with PID 4! 12

run the comment in cmd tasklist

and find which the PID and process name related to this now open window task manager

you can also open window task manager by using CTRL+ALT+DEL

now click on the process tab and find the name which using PID and right click on that and
end process

now again restart the xampp

Upvotes: 2

Rishabh Seth
Rishabh Seth

Reputation: 151

You can also find the application using PID 4 by following the steps below: 1)Press the CTRL+ALT+DEL and open the task manager. 2)Add column PID if not already in view. 3)Sort by PID and check which application has PID 4.

Upvotes: 2

Michal Brašna
Michal Brašna

Reputation: 2323

Some other application, in your case with PID 4, is using port 80 already.

You can find out which application is using it by

tasklist /svc /FI "PID eq 4"

and then terminate it or edit xampp's configuration to run on different port and restart it.

Upvotes: 1

Related Questions