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

Leave a Reply



(Your email will not be publicly displayed.)


Captcha Code

Click the image to see another captcha.


Posted by:

Share: