I had been trying to set up Internet Information Services (IIS) under Windows 7 to use PHP and MySQL to save myself the trouble of having both IIS and XAMPP installed. After a short time I managed to get it running rather easily using the Web Platform Installer. This was great apart from a couple of small annoyances when developing PHP applications. After a few weeks of use, I decided it was about time to switch back to XAMPP as it removed all of the annoyances I had encountered – here, I ran into a couple of problems!
IIS Removal
I began by uninstalling IIS from the “Turn Windows features on or off” dialog in “Programs and Features”. This seemed to go fine and about a minute later I was rebooting my system.
Once my system had rebooted, I began the installation of XAMPP and got right to the end where it mentioned apache could not start. I thought this must be due to having some other peice of software bound to port 80, e.g. IIS didn’t uninstall correctly or Skype was running – neither of which were the case. I downloaded a tool called TCPView which allows me to see all of the connections from my machine and which application they originate from. I found the http protocal that was listening on the local port (being port 80) belonged to System (PID 4).
Upon looking up this process in Task Manager, I found it to be the “NT Kernel & System” which immedietly made me assume it was an incomplete removal of IIS. I tried reinstalling and removing IIS, uninstalling all of the related web tools such as the Web Platform Installer, IIS Redirects and finally rebooting the system a couple of times. None of these methods fixed the problem and Google searches were not finding any useful information.
The Solution
It appears there are a couple of different applications that can cause this same problem;
- IIS is still running.
- SQL Server Reporting Services is running.
- Web Deployment Agent Service is running (this was my problem).
To fix my issue (number 3), I followed the following procedure:
- Open up the services screen (Right click “Computer” from either your desktop or start menu, then “Manage”. Once the window has opened, expand “Services and Applications” and select “Services”).
- On the services screen there should be one called “Web Deployment Agent Service”, if this is running, double click it and stop the service.
- Finally, change the startup type to “Disabled”.
Now if you try to run apache on port 80, it should start fine!