I have XAMPP installed on my machine. I am trying to run Apache from the XAMPP Control Panel.
I start the XAMPP Control Panel by right-clicking the shortcut and selecting "Run as administrator" (I am logged in on an account with Administrator privileges). The Control Panel starts up and everything appears to be in order (no error messages/warnings).
When I click the Start button next to Apache I get the following error message:
2:22:44 PM [Apache] Attempting to start Apache app...
2:22:45 PM [Apache] Status change detected: running
2:22:45 PM [Apache] Status change detected: stopped
2:22:45 PM [Apache] Error: Apache shutdown unexpectedly.
2:22:45 PM [Apache] This may be due to a blocked port, missing dependencies,
2:22:45 PM [Apache] improper privileges, a crash, or a shutdown by another method.
2:22:45 PM [Apache] Check the "/xampp/apache/logs/error.log" file
2:22:45 PM [Apache] and the Windows Event Viewer for more clues
Note that it's telling me Apache has shutdown unexpectedly and to check the error.log file and the Windows Event Viewer.
I checked the error.log file but it's empty:
I also checked for any events using Windows Event Viewer but the event viewer shows no events (under Application):
I have checked for programs that might be blocking ports, etc. (like Skype, Visual SVN Server) and closed any programs that might be causing the issue.
Is there anything else I can do to find out what might be going on?
Thank you.
UPDATE
I figured out the problem by trying to run apache from a DOS command prompt. Running from the command prompt gave me the specific errors and the location in the httpd.conf file where those errors were. It turns out that my ServerRoot and DocumentRoot values were incorrect (pointing to wrong directories). I changed them to point to the correct directories and now I can start apache from the Control Panel.
Curious, why didn't I see the error messages about ServerRoot and DocumentRoot when launching from the Control Panel?
1. Resolve Apache Port Conflicts. If Apache cannot start, you won't be able to access your XAMPP dashboard or any sites you have installed on the platform. A port conflict may be the underlying problem.
Just wanted to mention that I also used the command prompt technique.
MY PROBLEM: I had restarted Apache but was unable to get the program to start again.
Solution attempt 1: This did not work. I had no programs such as SKYPE hogging the ports, but I tried to adjust my port settings anyway.
Solution attempt 2: This did not work. Another solution I had read was to also allow public access in windows firewall or disable firewall. I attempted this.
Solution attempt 3: This did work Finally I stumbled upon this post. I opened gitbash (although default windows command prompt would work fine).
I typed "cd c:/xampp/apache/bin" I then typed "httpd"
This presented me with a syntax error and pointed me to a specific line in my "httpd-vhosts" file. I figured out what was wrong with that line, in my case a missing "#". Saved the file and then typed "httpd" again. This time the apache server started.
Hope this helps some people!
In my case I had to install XAMPP on server running IIS and I have to have IIS running. So, in XAMPP, if you change port via main Config button > Service and Port Settings it will not do anything. Instead, simply click on Config Button for Apache and then Apache (httpd.conf). Change "listen 80" to "listen 8080" (no quotes) or whatever port number you wish - just make sure it's not currently used. I hope it helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With