I have just installed XAMPP and everything works fine except that I can\'t get apache to run. It seems that port 80 is the problem, I have disabled Skype to use port 80 but
Find out which other service uses port 80.
I have heard skype uses port 80. Check it there isn't another server or database running in the background on port 80.
Two good alternatives to xampp are wamp and easyphp. Out of that, wamp is the most user friendly and it also has a built in tool for checking if port 80 is in use and which service is currently using it.
Or disable iis. It has been known to use port 80 by default.
In my case I simply had to run the control panel as administrator
Like Ianshark points out, a common reason for this error in Windows 7 is the Web Deployment Agent service.
The Web Deploy Tool enables administrators to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.
You can disable it from XAMPP Control Panel by clicking the "Services" button. If you have changed the port in the Apache config file, change it back to 80. Then uninstall Microsoft Web Deploy, if you prefer a more permanent solution.
In my case the problem was that the logs folder did not exist resp. the error.log file in this folder.
If you just want to make Apache run an don't mind which port it is running on, do the following:
In the XAMPP Control Panel, click on the Apache - 'Config' button which is located next to the 'Logs' button.
Select 'Apache (httpd.conf)' from the drop down. (notepad should open)
Do Ctrl + F to find '80'. Click 'find next' three times and change line Listen 80
to Listen 8080
Click 'find next' again a couple times until you see line ServerName localhost:80
change this to ServerName localhost:8080
Do Ctrl + S to save and then exit notepad.
Start up Apache again in the XAMPP Control Panel, Apache should successfully run.
Use http://localhost:8080/
in your browser address bar to check everything is working.
EDIT
Also you may have problems running XAMPP while running IIS. If you are running IIS it might be worth stopping the service then starting XAMPP.
Do you have Bitnami installed? If so it is most likely one of those installations check by opening command prompt as admin or terminal in linux, enter this...
netstat -b
This will give an application name to those processes and ports in use. Look for :80 or :443