When I try to start Apache, it gives me this error:
11:30:58 PM [Apache] Error: Apache shutdown unexpectedly.
11:30:58 PM [Apache] This may be due to a blocked port, missing dependencies,
11:30:58 PM [Apache] improper privileges, a crash, or a shutdown by another method.
11:30:58 PM [Apache] Press the Logs button to view error logs and check
11:30:58 PM [Apache] the Windows Event Viewer for more clues
11:30:58 PM [Apache] If you need more help, copy and post this
11:30:58 PM [Apache] entire log window on the forumsIt used to work before I uninstalled XAMPP, but now it doesn't do anything. What do I do?
1 Answer
The first thing you should do is check your Apache log files. These can be found under the logs directory for the XAMPP Apache installation (e.g. c:\xampp\apache\logs). Any error.log may contain useful information.
As additional basic troubleshooting, the next things to try are:
Run
httpd.exemanually (under e.g.c:\xampp\apache\bin). Open a command windows in e.g.c:\xampp\apache\binand typehttpd.exe. This should cause Apache to attempt to start. If it cannot, it will display one or more errors that might help explain why it's failing to start (such as incorrect configuration details and the exact file/line numbers in which those issues appear).Look for port conflicts with the
Netstattool in the XAMPP control panel. Particularly, look for entries including port80(HTTP) and port443(HTTPS). Other conflicting ports may be8000,8008and8080(depending on how XAMPP is configured). If these entries exist (and Apache isn't running), this means there is another program or service already using that port (which could conflict with Apache). If this is the case, any program or service associated with an entry may need to be shut down for Apache to run correctly. Note that you can achieve (roughly) the same output as usingNetstatfrom the XAMPP control panel withnetstat -afrom the Windows command line.
Lastly, you can view logs related to e.g. any installed Apache service crash with the Windows Event Viewer in Windows 7 and 10 by typing event viewer into Windows Search and selecting the Event Viewer link that automatically appears.
Note that since you have had XAMPP installed prior to this, there may also be some issue with Windows service entries. If all else fails, you may want to look for any service entries marked e.g. Apache2.4 under the Services control panel (Windows Search, type services and select the entry with a "gears" icon simply marked Services) and uninstall/reinstall those service, as needed).