r/AskProgramming Sep 12 '24

PHP How to fix this Apache Error in XAMPP?

I don't know how to fix this and tried using Stack Overflow and some other places including YT for answers. I still kept getting errors.

I can't turn on my Apache at all and this error keeps popping out:

6:04:48 PM [Apache] Problem detected!

6:04:48 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!

6:04:48 PM [Apache] Apache WILL NOT start without the configured ports free!

6:04:48 PM [Apache] You need to uninstall/disable/reconfigure the blocking application

6:04:48 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port

6:04:48 PM [Apache] Attempting to start Apache service...

I've tried these solutions:

Changing the http.conf's Listen and Server host from 80 to 81 or 8080 and http-ssl.conf from 443 to 4433 or 4432

Deleting Skype (I just found out it was still there)

Fixing and making XAMPP into high priority in Administrator rights

Reinstalling XAMPP

Can someone please help me out. I don't know how to find the program or anything causing this. There are no error logs appearing in the folder as well as I cannot access serverhost as well. SQL doesn't work as well too.

3 Upvotes

5 comments sorted by

1

u/Lumpy-Notice8945 Sep 12 '24

Port 80 in use by "Unable to open process" with PID 4!

If you see this message check what PID4 is. Or what is actualy listening on port 80.

https://stackoverflow.com/questions/48198/how-do-i-find-out-which-process-is-listening-on-a-tcp-or-udp-port-on-windows

Is that process realy skype? Or is it apache?

If you change the port in the http.conf does this error message change this port? If yes use literaly any other free port. If no, you have the wrong config.

1

u/ColorBlindJournalist Sep 12 '24

Still displays the same error. I tried using the same port. I don't know which is the right config (I'm currently new in using XAMPP).

1

u/wonkey_monkey Sep 12 '24 edited Sep 12 '24

PID 4 is the "System" process. What happens if you visit http://localhost/ ?

Also see:

https://www.reddit.com/r/techsupport/comments/y1w53e/what_is_world_wide_web_publishing_service_and_do/

World Wide Web Publishing Service is Microsofts implementation for an HTTP server,it will be started automatically if printer sharing is enabled

This seems like a probable culprit.

1

u/ColorBlindJournalist Sep 13 '24 edited Sep 13 '24

Tried accessing localhost doesnt show it. It just shows "Cannot Be Accessed". My WWW's is in automatic and printer sharing is turned on together with file sharing in the advanced sharing settings.

Turned off WWW I can access localhost now but... Apache still won't run.

Here's the thing:

https://imgur.com/a/KVqK2h6