Apache won't start in xampp

If you use XAMPP to run a local web server, you might have come across the problem whereby Apache will not start. You click the Start button in the XAMPP control panel, the green 'Running' message appears for a second or two, then disappears again, and Apache fails to start. This can be a very frustrating problem, as you get absolutely no feedback about why it won't start. I found 2 possible causes for this...

The first, and by the looks of things on Google, most common cause, is that some other application is using port 80 on your PC. A likely culprit is Skype. If you open Skype, and go to Tools->Options... and click on 'Advanced' followed by 'Connection', check whether the 'Use port 80 and 443 as alternatives for incoming connections' option is checked. If so, uncheck it, and make sure the port number in the box at the top is not 80.

If Skype is not using port 80, you might be able to work out what is using that port by opening the Windows command console (in Windows XP, go to Start->Run, type 'cmd' [without quotes] and press enter), and typing:

netstat -a -no

...then press enter. Look for or If you can see one of those, it is likely that another process is using port 80. Make a note of the value in the PID column (Process ID). Then type the following into the command window:


...and press enter. You should then be able to match the PID with the executable file that is using that port. It might be obvious from the file name which application is causing it, or you might have to look it up on google. You could also try ending the task in the windows task manager (do so at your own risk!).

The second cause I found, was that if there is an invalid or conflicting value in your php.ini file, it can cause Apache to bomb out and fail to start. Try replacing your php.ini with the default copy that comes with XAMPP (you can find php.ini that is used by xampp at runtime in the /xampp/apache/bin/ folder. A separate copy of php.ini [as supplied] is available in the /xampp/php/ folder), or undo any changes you may have recently made to php.ini. In my case, I found that trying to load both Zend Optimizer and ionCube caused the problem, so I had to comment out one of them.

If neither of these are the cause of your problem, the first place to start looking would be the Windows Event Log. Then panic.


Posted by John on
I was following your instructions right up until I read "then panic" ...and thought, "oh god no"

This is such an irritating problem!!!!!!!
Posted by iks on
Thanks alot it helped me
Posted by Mike on
Incredibly frustrating problem. I have used XAMPP on a number of other PCs with no problem. Now, I just installed it on another PC and no luck. It doesn't seem to be either of these problems so I am going with option 3 - PANIC.

So I'm punting and uninstalling XAMPP and reinstalling. The equivalent of turning it off and back on again. We'll see how that goes.
Posted by Mike on
Thanks for this, fixed the problem quickly with your instructions - Cobian Backup was the culprit for me, stopped that service and apache started :-)
Posted by Mike on
Thanks so much! You just saved me countless hours. After a recent install of Skype I had this problem, but I didn't put 2 and 2 together. Much appreciated!
Posted by Neal on
None of this worked but I had to install the visual C 2008 redistributable. I found another site with the info. I figured this out by trying to start apache from the command prompt and got "The system cannot execute the specified program". Googling this and apache gave the links I needed. Hope this helps anyone else who runs into it.
Posted by Kyle on
This doesn't always work. But it does help cancel out any other possibilities to the problem. In my case this process has worked once and now im setting up a fresh Apache server on a different machine and the problem is back.

Tried using this workaround no avail.

Only way i solved it was to keep reinstalling the application. But when uninstalling ensure than Apache is turned OFF and to delete all remaining folders in the xampp directory.

Install again and presto... works fine.

This may help those who cant seem to solve the issue

p.s. if changing skype ports doesn't work, shut down skype and find any service related to skype and shut them off too...

Hope this helps :)
Posted by Matt on
Thank you! Saved me a hefty amount of time.
Posted by QASIM on
this solved it toootaaaalllly.

unlike other makshift solutions lying around the net./

the explanation was just absolutely on point.

God Bless You.
Posted by rino on
thanks a lot, i solved installing the visual C 2008 redistributable!!

Posted by Drew on
It was Skype for me! Thanks a lot for your help.
Posted by Ir on
Unchecking port 80 in Skype fixed the problem for me. Many thanks!!!
Posted by johnt on
Thank you for you advice concerning Skype's use of ports 80 & 443 as alternatives. I've been trying to get IndigoAMPP's implementation of Apache to work for the last 2 days. Your suggestion works perfectly.
Posted by Pip on
"A likely culprit is Skype." - Perfect, cheers. Took longer to write this message than to find the answer...cheers
Posted by Anon on
got to panic... then figured out my problem.

close xampp and run as admin. started the service no problem. hope this helps someone out!
Posted by joeflack on
Thank you so much! Skype was indeed my culprit.
Posted by doctorgrab on
I tried reinstalling xampp didnt work. tried changing the options in skype tools menu didnt help. removed the skype service from startup in msconfig(win xp) didnt help. Ran the netstat -a -no command in dos and found there was process on 0:0:0:0:80 i then followed the process id to task manager and sure enough it was skype and i terminated the process my apache works fine now thanks a span.
Posted by HeadInTheClouds on
Very useful, thanks.
If you also add this:
(i.e. open command prompt (as administrator in Windows 7) in the xampp/apache/bin folder
run httpd.exe, observe response (I got the following: (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address [::]:80)
Which tells me port 80 is not available.
Sitepoint Craig Buckler's advice to check for "Web Deployment Agent Service" was exactly the problem! (not in the way he describes it, but running, in my case as a result of installing Microsoft Webmatrix, which I thought could help me with debug of PHP! Stopping that service allowed Apache to start (but yellow not green in xampp control panel)
So I stopped it again, restart failed..
And - this was the final fix....
Open Task manager -> Sort by description, scroll down to Apache HTTP server, "End process", go back to xampp and restart Apache! YESSSSSSSS
Posted by Mr.G on
I found
commenting out
#LoadModule ssl_module modules/mod_ssl.so

made apache start
Posted by Wayne on
Skype was sort of the culprit. It was indeed using the port 80, but after unchecking that, Apache still wouldn't start. Running the command from the prompt showed that port 80 was being used by System PID 4. A little Googling and I came across this: http://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that

My problem was being caused by Web Deployment Agent Service (MsDepSvc), part of WebMatrix. Disabled that through Services and I'm good to go.
Posted by unfounded on
I was trying to find what was causing a simmilar problem on my system, it can be quite a problematic experience for a developper to not be able to do anything coz your tools dont work. I realized that non of these helped, not that this is not useful post.... it is very useful if you are relying on the cause of the problem to be some other program or configuration. What if non of these are causing a problem? i.e no application running on port 80 or firewall blocking the same....
After looking around I realized that when you make changes to the modules you use like for example i downgraded from postgre 9.1 to 8.4 and xampp did not update this automatically, it is useful sometimes to check httpd.conf for values or modules that are no longer accessible, if the path has changed you may want to include the full path. this is because if apache doesnt find any of the files files listed it throws an error.
Posted by Stev on
Skype. Thank you so much for this great resource.
Posted by Dhaarini on
VMWare blocks port 443 but not port 80 and apache needs both 80 and 443 to be unblocked by other processes

so, do look for both port 80 and 443 while you check from the command prompt using netstat -a -no.

Then for those people, for whom VMWare is the culprit,

open VMWare,
Go to Edit > Preferences.
Click the Shared VMs.

DISABLE SHARING and this would mean port 443 is closed for access by VMWare and your apache on Xampp will run fine!
Leave a Reply

(Your email will not be publicly displayed.)

Captcha Code

Click the image to see another captcha.

Posted by