You must have Javascript enabled to experience this site.

XAMPP Apache shutdown unexpectedly

Posted & filed under Coding Tips.

XAMPP Apache stops unexpectedly. Now what?

My main development machine is running Windows 8.1, so to get a proper web stack I use the brilliant XAMPP package from Apache Friends. Then one day I try to start some WordPress development and get this.

XAMPP_Apache_error

5:42:36 PM [main] Executing “c:\apps\xampp\apache”
5:43:41 PM [Apache] Checking default ports…
5:43:41 PM [Apache] Attempting to start Apache app…
5:43:41 PM [Apache] Executing “c:\apps\xampp\apache\bin\httpd.exe”
5:43:41 PM [Apache] Return code: 0
5:43:41 PM [Apache] Status change detected: running
5:43:42 PM [Apache] Status change detected: stopped
5:43:42 PM [Apache] Error: Apache shutdown unexpectedly.
5:43:42 PM [Apache] This may be due to a blocked port, missing dependencies,
5:43:42 PM [Apache] improper privileges, a crash, or a shutdown by another method.
5:43:42 PM [Apache] Press the Logs button to view error logs and check
5:43:42 PM [Apache] the Windows Event Viewer for more clues
5:43:42 PM [Apache] If you need more help, copy and post this
5:43:43 PM [Apache] entire log window on the forums

 

Now the first suggestion that everybody has is that something else is using port 80, and XAMPP includes the Netstat tool to check this right on the top of the control panel (awesome). Checked that (and port 443 for HTTPS) – not the problem. There were no other messages in any of the logs (Apache or Windows), only what is in the control panel. More searching (“check port 80” – done that already).

Finally I find a comment on Stack Overflow (http://stackoverflow.com/a/23504913) where someone was having this exact issue because one of their Document Roots was invalid. Then I remembered that I had moved my documentation library to another server and that I had been using Apache to serve these. Comment out that virtual server and Apache starts normally.

Talk about cryptic. A “Document Root directory not found” error message would have been nice.

 

138 views