0

I'm a beginner in PHP. When attempting to start Apache using XAMPP, I saw the following error messages in my log:

11:42:18 AM  [Apache]   Problem detected!

11:42:18 AM  [Apache]   Port 80 in use by "Unable to open process" with PID 4!

11:42:18 AM  [Apache]   Apache WILL NOT start without the configured ports free!

11:42:18 AM  [Apache]   You need to uninstall/disable/reconfigure the blocking application

11:42:18 AM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port

11:42:18 AM  [Apache]   Attempting to start Apache app...

11:42:19 AM  [Apache]   Status change detected: running

How to fix these errors?

Amal Murali
  • 75,622
  • 18
  • 128
  • 150
Masum007
  • 1
  • 4

3 Answers3

1

If you're running "Skype" from Microsoft, close it.

No just from the window, right click close/exit on the skype icon on the taskbar (in your clock) or kill the moth*** process in the task manager if you've been stucked for a while with this (it gave me some relief a few years ago), if works open skype and kill it again just to be sure. If you're not running skype, try something from here:

http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/

If you didn't click I will quote the article here:

The Obvious Candidates

There are a number of well-known Windows programs which use port 80:

IIS The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:

net stop was /y

or XP:

net stop iisadmin /y

SQL Server Reporting Services SSRS can remain active even if you uninstall SQL Server. To stop the service:

Open SQL Server Configuration Manager.
Select “SQL Server Services” in the left-hand pane.
Double-click “SQL Server Reporting Services”.
Hit Stop.
Switch to the Service tab and set the Start Mode to “Manual”.

Skype Irritatingly, Skype can switch to port 80. To disable it, select Tools > Options > Advanced > Connection then uncheck “Use port 80 and 443 as alternatives for incoming connections”. What’s Using Port 80?

Further detective work is necessary if IIS, SSRS and Skype are not to blame. Enter the following on the command line:

netstat -ao

The active TCP addresses and ports will be listed — locate the line with local address “0.0.0.0:80″ and note the PID value.

Now right-click the task bar and select Start Task Manager. Navigate to the Processes tab and, if necessary, click View > Select Columns… to ensure “PID (Process Identifier)” is checked. You can now locate the PID you noted above. The description and properties should help you determine which application is using the port.

The Task Manager allows you to kill the process, but be a little wary about doing that — especially if it’s “NT Kernel & System”. Microsoft-HTTPAPI/2.0

NT Kernel & System is an essential service. Stopping it will probably stop Windows in a blue-screeny-like way. Therefore, enter the following at the command line:

telnet 127.0.0.1 80

If you’re faced with a blank screen, type “GET” and hit return. The chances are, you’ll see a line stating that Microsoft-HTTPAPI/2.0 is listening on port 80. If that’s the case, open Services from Administrative Tools and locate “Web Deployment Agent Service”. Stop the service and set it’s startup type to “Manual”.

The Web Deployment Agent Service is deployed with WebMatrix and was the cause of my woes. It may also be distributed with other applications installed using Microsoft’s Web Platform Installer.

That caused me a few frustrating hours so I hope it solves your Apache or WAMP start-up problems.

If you enjoyed reading this post, you’ll love Learnable; the place to learn fresh skills and techniques from the masters. Members get instant access to all of SitePoint’s ebooks and interactive online courses, like PHP & MySQL Web Development for Beginners.

Allende
  • 1,480
  • 2
  • 22
  • 39
0

Stop all apaches and any web-servers you already running and then run xampp with admin privileges (click right button on app).

BaBL86
  • 2,602
  • 1
  • 14
  • 13
0

Open Service Control Manager [Start -> "services.msc" (enter)] and Stop the Following services if they are enabled and are not important you.

  • World Wide Web Publishing Service (IIS)
  • Web Client
  • Web Deployment Agent Service

Also check for applications like (Since PID is 4, the service must be from Microsoft so this is rare)

  • Skype
  • TeamViewer
  • VMWare Products (In very rare case, if you have configured)
Jigar
  • 3,256
  • 1
  • 30
  • 51