Apache starting issues are a very very common reason why threads will be created at this board.
In many cases users don't gave us sufficient information to analyze this problem properly.
This thread should help you to identify the specific issue and find solutions for it or at least give us more detailed information about the specific issue.
XAMPP Apache is not able to start after clicking the [Start] Button in your Control panel or executing the apache_start.bat script.
XAMPP control panel shows the following lines of code
XAMPP control panel wrote:XX:XX:XX [Apache] Status change detected: running
XX:XX:XX [Apache] Status change detected: stopped
XX:XX:XX [Apache] Error: Apache shutdown unexpectedly.
XX:XX:XX [Apache] This may be due to a blocked port, missing dependencies,
XX:XX:XX [Apache] improper privileges, a crash, or a shutdown by another method.
XX:XX:XX [Apache] Press the Logs button to view error logs and check
XX:XX:XX [Apache] the Windows Event Viewer for more clues
XX:XX:XX [Apache] If you need more help, copy and post this
XX:XX:XX [Apache] entire log window on the forums
Maximize debugging information
Solving Apache start issues without proper privileges can be very challanging. Running the control panel without elevated administrator rights results in lack of privileges to read out process data and service information. That makes it very difficult to identify the real reason why Apache cannot start.
Indicator for missing privileges are the following lines in your control panel
XAMPP control panel wrote:XX:XX:XX [main] You are not running with administrator rights! This will work for
XX:XX:XX [main] most application stuff but whenever you do something with services
XX:XX:XX [main] there will be a security dialogue or things will break! So think
XX:XX:XX [main] about running this application with administrator rights!
To solve that issue you have to restart your control panel with elevated administrator rights:
- rightclick your xampp-control.exe file
- choose "run as Administraor"
- if UAC is enabled you need to confirm that you really want to run as Administrator
- if you are not logged in as Administrator on your Windows system you need to type in the credentials of an administrator
Identify the specific issue
There are some ressources that helps to identify the specific issue.
Other control panel messages
The Control panel does some prechecks at start like port scans for needed ports. If any problems found they gets reported by the following schema
XAMPP control panel wrote:XX:XX:XX [Apache] Problem detected!
XX:XX:XX [Apache] Port XXX in use by "XXXXXXXXXXXXXXX" with PID XXXX!
XX:XX:XX [Apache] Apache WILL NOT start without the configured ports free!
XX:XX:XX [Apache] You need to uninstall/disable/reconfigure the blocking application
XX:XX:XX [Apache] or reconfigure Apache and the Control Panel to listen on a different port
The most important line of this block is the second line which can contain information about the blocking application file and process id (PID)
Here are some common blocking applications and their recommend solutions
Solution: [Q&A] solving Port 80 in use by PID 4 (http.sys) issueXAMPP control panel wrote:XX:XX:XX [Apache] Port 80 in use by "Unable to open process" with PID 4!
Solution: [Q&A] solving Port 80 & 443 in use by Skype issueXAMPP control panel wrote:XX:XX:XX [Apache] Port 80 in use by "C:\Program Files (x86)\Skype\Phone\Skype.exe" with PID XXXX!
XX:XX:XX [Apache] Port 443 in use by "C:\Program Files (x86)\Skype\Phone\Skype.exe" with PID XXXX!
Solution: [Q&A] solving Port 443 in use by VMWare issueXAMPP control panel wrote:XX:XX:XX [Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID XXXX!
XAMPP control panel wrote:XX:XX:XX [main] XAMPP Installation Directory: "c:\program files (x86)\xampp\"
XX:XX:XX [main] WARNING: Your install directory contains spaces. This may break programs/scripts
XX:XX:XX [main] WARNING: Your install directory contains special characters. This may break programs/scripts
response of "\xampp\apache_start.bat"
This batch starts Apache in the command line and will always response specific information about starting issues, like this:
Solution: [Q&A] solving ServerRoot must be a valid directory\xampp\apache_start.bat wrote:httpd.exe: Syntax error on line XX of X:/xampp/apache/conf/httpd.conf: ServerRoot must be a valid directory
\xampp\apache_start.bat wrote:(OS 5)Access is denied : AH00091: httpd.exe: could not open error log file C:/Program Files (x86)/xampp/apache/logs/error.log.
AH00015: Unable to open logs
Windows error windows
Cannot create file "C:\Program Files (x86)\xampp\xampp-control.ini". Access is denied
General Workaround for blocked ports: Changing Apache default ports
In almost all cases this should be the last solution you should use. Mostly there are better solutions which does not have any negative influences to your third party applications (See "Identify the specific issue").
If you still want to change the default ports, here is the way to do: [Q&A] Changing the Apache default ports
( To be continued - last edit 2014-11-11 )