Netshine Software Limited







Home arrow Developer Blog Make Text BiggerMake Text SmallerReset Text Size

Apr 27
2009

Apache won't start on XAMPP

Posted by netshine in xamppwindowstasklistskypeprocessportPIDphp.iniPHPconsoleapache

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 127.0.0.1:80 or 192.168.1.100:80. 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:

tasklist

...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.



Comments (19)Add Comment
Thanks
written by Alex, May 14, 2009
Very useful information. Got mine working again, thanks to you. I did the Skype thing, look at the Apache error logs, looked at the Event Viewer... got nothing. Even checked the syntax of my config file, it was OK. I somehow had two "httpd.exe" running, and after closing both of those and restarting Apache, it worked perfect. Thanks a million. I can finally get back to work now.
report abuse
vote down
vote up
Votes: +3
Thanks
written by Rhys, May 20, 2009
I think this is the fastest I've ever found the answer to an obscure 'application doesn't work and it's not telling me why' problem
report abuse
vote down
vote up
Votes: +0
Kudos
written by Jerminix, September 11, 2009
Thank you very much for the information, got mine working again, I thought it was an OS issue, I am currently using Windows 7 , skype and apache. I restarted my pc after changing the skype settings, works well now, thanks....
report abuse
vote down
vote up
Votes: +0
Thanx
written by Luke, September 26, 2009
Was about to uninstall and reinstall XAMPP but your article saved me that trouble. Thank you very much!
report abuse
vote down
vote up
Votes: +0
Thanks
written by Cassidy, November 01, 2009
Thanks for the info... I realized that there was no php.ini in the apache/bin folder and copied the default in. Now it's up and working.
report abuse
vote down
vote up
Votes: +0
Thanks
written by Dude, November 11, 2009
helped a lot! thank you
report abuse
vote down
vote up
Votes: +0
Another solution...
written by Philippe, November 13, 2009
I had the same problem, no Skype or IIS or anything, in the end all I had to do was move XAMPP from one directory 'F:Program Files (x86)xampp' to 'F:xampp' !! Too many spaces or something?!
report abuse
vote down
vote up
Votes: +1
...
written by joan, November 30, 2009
THANKS A LOT. my problem was skype!
report abuse
vote down
vote up
Votes: +0
...
written by Dva, December 08, 2009
Still no good for me
I've checked via the cmd window that nothing else is on port 80, copied the php.ini in the apache/bin folder and I still cant get apache running. I have xampp saved in the C drive - C:xampp
but still getting:

Busy...
Apache started

and the start button still won't change to 'running'.
I've rebooted, uninstalled and reinstalled, tried the above again, and still no good...
report abuse
vote down
vote up
Votes: +1
...
written by jouu, December 14, 2009
Thaaaaaaaaaaaankss smilies/cheesy.gifsmilies/cheesy.gif ur the Besttt smilies/wink.gif
report abuse
vote down
vote up
Votes: +0
Orphan Processes
written by Rebecca, January 04, 2010
Can also be caused by Orphan processes which haven't died when Apache was shut down. You have to kill the orphan processes manually.
report abuse
vote down
vote up
Votes: +0
"netsh winsock RESET" worked for me
written by Nausher, January 13, 2010
I tried this and also tried and also adding a
Win32DisableAcceptEx
into the httpd.conf file in a line by itself, to avoid having the "winnt_accept: getsockname error on listening socket, is IPv6 available?"
error returned.

Finally, running "netsh winsock RESET" and restarting my machine did the trick.
Didn't even need the Win32DisableAcceptEx.

I am running XAMPP Lite 1.7.2 (Apache 2.2.14) on a Win 2003 Server64-bit
Note: I had IPv6 disabled in the XAMPP Setup
report abuse
vote down
vote up
Votes: +0
Skype was my Culprit
written by Joseph Johnson, January 26, 2010
Thank you very much; this was annoying the heck out of me and changing Skype's settings fixed everything for me... Thanks again.

Btw... Nice Joomla site. smilies/wink.gif
report abuse
vote down
vote up
Votes: +0
Thanks a lot
written by Saad Bassi, February 02, 2010
Skype was culprit.smilies/smiley.gif
report abuse
vote down
vote up
Votes: +0
Thank you
written by Jonathan, February 02, 2010
I couldn't figure out why Apache wouldn't start. It kept staying "Apache service started" but the 'running' dialog never showed up. So after a quick Google search, I found this article and sure enough, it was Skype. You're a lifesaver. Thank you.
report abuse
vote down
vote up
Votes: +0
Culprit is SKype
written by Sathiya, February 06, 2010
I faced the same prob when i changed the Port setting, Apache started running.

Thanks Again,
Sathiya
report abuse
vote down
vote up
Votes: +0
ooVoo causes the problem too...
written by MiloMal, February 11, 2010
If you are using ooVoo, it causes the same problem with Apache as Skype. I had to kill the ooVoo processes using the task manager. Apache then fires up with no problem.
report abuse
vote down
vote up
Votes: +0
Fixed! Thanks a bunch
written by Chris Brauckmuller, February 17, 2010
I unchecked the box in Skype, restarted both XAMPP and Skype and everything was fixed. Thank you!
report abuse
vote down
vote up
Votes: +0
Port 80 used by system
written by Anwar, March 07, 2010
Hi

If someone face this problem here is how I resolved it :

I got this error in Apache error.log :

(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

Which mean that port 80 is used by another process, but when I tried to look at this port using Nirsoft CurrPorts (great freeware tool btw, better than netstat) I found that it was used by system with no PID or anything, which of course I interpreted as being used by a windows service, and I wasn't wrong, I open the service manager (right click over computer / manage / services ) and I tried to look at the running services quickly who can be the possible reason, and I found that it was

World Wide Web Publishing Service

I stopped it and refreshed Currports, and bang no more process using the port 80, so I launched XAMPP (apache) again and it run like a charm, you can set the service to run Manual instead of Automatic, to avoid this port conflict again, this service is required only if you are using your computer as a IIS server or for some remote administration purposes.

Thank you and good luck
Anwar Ben Tanfous.
report abuse
vote down
vote up
Votes: +0

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security code
Write the displayed characters


busy
Joomla! Tutorial
Take a look at our free tutorial for Joomla! Administrator...


Login Form





Lost Password?

© 2004-2010 Netshine Software Limited   Terms and Conditions