Saturday 7 March 2015

Debugging Apache, My SQL configuration on XAMP

Following are a usual problem reported from Apache/MySQL users

And following general error message will give only clue on a probable port issue where the configured port is already in use. Anybody point this cause will usually predict skype may be the culprit because of a default settings on skype to use ports 80/443 in case the one selected is not available.
-----------------------------------------------------------------------------
This may be due to a blocked port, missing dependencies, 
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
-----------------------------------------------------------------------------

Following are the usually available advises

1. If you are using the latest Skype, go to Tools -> Options -> Advanced -> connection. Disable the       "Use port 80 and 443 for alternatives for incoming connections"
    Sign Out and Close all Skype windows. Try restart your Apache again.
    To find the program running port 80 conflicting with XAMPP, click theNetstat button at       the far-right. You will see a list of programs together with their respective running port           and PID.
2.  Another reason people usually say is DocumentRoot ServerRoot 
Best way to solve
Best way to solve these kind of issues on Apache/MySQL is to run the batch file associated in the command prompt. This should be the first step executed to debug configuration/dependency issues on Apache/MySQL. The advantage of this step if that it will save lot of time. When we run the batch file, it will display the exact reason for the issue with file and line no affected.
Apache_Start.bat
MySQL_Start.bat