0

When XAMPP starts, I am getting the error below. I have already tried all sorts of port settings (listen:xx, servername:xxx settings in httpd.conf, httpd-ssl.conf) provided in this SO question.

Error: Apache shutdown unexpectedly.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

All of the threads with similar questions were revolving around one answer - "system port". I have already tried this and it didn't solve my issue.

Community
  • 1
  • 1
iqbalmp
  • 607
  • 1
  • 14
  • 24

1 Answers1

0

Open XAMPP Control Panel and select Config under Apache. Select your httpd.conf and locate the following line.

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80 
Listen **xx**

Where you see xx change this to something like 8080 if it currently states 81. Port 81 is commonly used by a few applications, so I tend to always change to 8080 by default, but your network may be different. You may obviously use netstat to see what ports may be available to you.

Restart XAMPP entirely as Apache is very fussy, then try starting Apache again.

Should changing ports not help, you can also try uninstalling and reinstalling the Apache service from the control panel through the following steps;

  1. Start Xampp Control Panel
  2. Uninstall Apache by clicking on Apache Module
  3. Uninstall Mysql by clicking on Mysql Module
  4. Again install both module by clicking on Xampp Control Panel.

Should both fail, there is an interesting guide here as well in case of duplicate services.

CodeSpent
  • 1,684
  • 4
  • 23
  • 46