How to fix XAMPP error “Apache shutdown unexpectedly” 2021

Rebecca
Rebecca
23 Min Read
Error Apache shutdown unexpectedly

Error: Apache shutdown unexpectedly – Technical errors are rarely welcome, especially if they interrupt your workflow. If you are using XAMPP for local development, you may have encountered a particularly confusing message that says “XAMPP Apache Error Apache shutdown Unexpectedly”. Fixing this vague problem so you can get back to work can be frustrating.

Fortunately, solving it is often quite simple. All you need is a text editor to reconfigure some simple settings in your XAMPP files. What instants, you can delete this error and return to the creation of your last project.

From this article, we will not explain what it means to the message «XAMPP error Apache shutdown unexpectedly so that you will understand it. Then, we will guide you through three easy steps to solve the problem with tools that are probably already available to you. Let’s dive in!

Error Apache shutdown unexpectedly

What does “XAMPP error when Apache shutdown unexpectedly” mean?

Error: Apache shutdown unexpectedly – XAMPP is a powerful and popular development tool. You can use it to create a site on a local server. This is useful for creating new websites, as well as for testing changes, updates, and new .ux plugins or themes on existing websites.

Unfortunately, that doesn’t mean that XAMPP always works perfectly. Although well-designed, there is always the possibility that something will go wrong. In the case of the “XAMPP failed Apache shutdown unexpectedly” message, this problem can be particularly frustrating.

This warning appears when you try to start XAMPP. Also, this is not always the only error message you will see. You may also receive debugging information, such as text similar to the following:

Error: Apache shutdown unexpectedly. This could be due to a blocked port, missing dependencies, inappropriate privileges, a crash, or being shut down by some other method. Check the file “/ xampp / apache / logs / error.log” and the Windows Event Viewer for more clues.

That’s a lot of information in one message. Like you, it’s easy to be intimidated by all the possible causes of this problem. Also, knowing how to interpret all these details can be even more difficult if you don’t have a good understanding of the relevant technology.

Fortunately, the basic problem is usually quite straightforward. This error message generally means that there is another program that uses the same port as XAMPP by default.

A port is a network connection point used by

Often the culprit in this situation is Skype, as it uses the same default port as XAMPP. However, it could be another program. Trying to fix exactly which application is causing the problem can be a headache. That is why we will address the XAMPP file for the problem.

Read more: NET:: ERR_CERT_DATE_INVALID error in Chrome – How to fix

How to solve the message “XAMPP Error Apache Shutdown Unexpectedly” (in 3 stages)

If you ever try the b Avant configuration files, don’t worry. This process should be pretty straightforward. Also, all you will need is your XAMPP installation and a text or code, editor.

Step 1: Run the XAMPP Apache configuration settings

Error: Apache shutdown unexpectedly – All from First, launch the XAMPP panel. The program itself does not have to run. As long as you can access your dashboard, you should be able to resolve the monitor error.

Also, try to run XAMPP as administrator. You can do this by right-clicking on the program and selecting Run as administrator. This is not crucial for this tutorial, but it can avoid occasional unrelated errors.

Once you have started XAMPP, navigate to the line called Apache under the module in -head. Under Actions, select Settings.

Note that when you see the message “Error XAMPP Apache shutdown unexpectedly”, it means that the problem is specifically related to Apache. Therefore, you will need to click on that specific settings button to correct it correctly. None of the other lines in this window will work.

Clicking on the settings button will open a drop-down menu listing some file names. Each represents a configuration file for the program. Choose the first option, titled Apache (httpd. conf).

You can open it with your default text editor or with a specialized code editor. By making changes to the file and saving them, it doesn’t matter how you do it. We will use Notepad.

Once you open the httpd.conf file, you will see text similar to the following:

Error Apache shutdown unexpectedly

Again, this can be a bit intimidating if you are new to editing configuration files. The good news is that you only need to tweak a few simple things.

However, we recommend that you proceed with caution. Configuration files often contain information that is essential for the normal operation of a program. So try not to change anything you don’t understand. You may also want to save a backup copy of this file before proceeding to the next step.

Step 2: Change the default port settings in httpd.conf

Error: Apache shutdown unexpectedly – Like us As mentioned above, when you see the message “XAMPP Apache shutdown unexpectedly”, it is almost always a problem with a blocked port. As such, we are going to change the ports that the program normally uses to connect to your network.

Unless you have already changed it, the default port for Apache is 80. Port 80 is specifically for HTTP Programs. However, this is not just Apache’s default. Many other programs will also use port 80, which can cause conflicts if you try to run more than one program on that port at the same time.

To solve this problem, you must redirect Apache to port 8080. This is another specific port for HTTP. As such, XAMPP will continue to function normally, but with less chance of its port crashing again in the future. As such, this is also a preventive measure against future port conflict errors.

Let’s go back to the configuration file. Press Ctrl + F to open a search dialog. Enter 80 in the field to find each instance of the number in the file.

There will probably be a handful of cases where 80 Cursed Oc. However, it is not necessary to modify only a few. Specifically, you will need to change three things:

  1. Change port 80 to port 8080
  2. Change Listen 80 to Listen 8080
  3. Replace server name localhost: 80 is servername localhost: 8080

Again, we recommend that you only change these three items. Modifying unrelated rows will not only not resolve this error, but it could also cause another error. If you accidentally edit the wrong item, you can restore your backup or find the default Apache file on Github.

Save the httpd.conf file and close it when you are done creating these changes. Then go back to your XAMPP dashboard for the last step.

Step 3: Update the default port settings in HTTP-SSL.conf

Error: Apache shutdown unexpectedly – Finally, we are going to edit a final configuration file. To access it, repeat the instructions from step 1. Go to the Apache line in Module and select Configuration. However, this time, click on the second option in the drop-down menu, titled Apache (httpd-SSL.conf).

Open the text file in your preferred publisher r. However, this time it won’t search for 80. Instead, press Ctrl + F and search for the number 443.

Port 443 is the port that is generally used for secure web transactions. However, Apache needs it too. So you have to replace two instances of 443 with the alternate port – 4433.

  1. Change Listen 443 to Listen 4433
  2. Replace with

Also, be sure to save your work in this file. Once you’re done, close your text or code editor. Also, close XAMPP and restart it. This will reset the processes so Apache can use the new alternate ports that I specify.

After the reboot, everything should work normally. Your control panel should look like this:

Error Apache shutdown unexpectedly

From there, you should be able to click Start next to Apache and continue working at your leisure. Remember not to use ports 8080 or 4433 for other programs, or you may need to repeat this process.

Once you resolve this error, you may want to investigate other programs to see which one is using Apache’s default ports. If you decide to adjust another and the program settings to disconnect it, you can repeat these steps to reconnect XAMPP to ports 80 and 443.

Read more: DNS_PROBE_FINISHED_BAD_CONFIG error – How to fix

Conclusion

Error: Apache shutdown unexpectedly – Task solving a bug when you’re in the middle of a development project is tedious and time-consuming. Apache bugs, in particular, can get worse. Fortunately, by modifying some configuration files, you can quickly resolve this frustrating roadblock.

In this article, we have covered three simple steps to resolve the “Apache shutdown unexpectedly XAMPP error” message:

  1. Run the Apache configuration settings from the XAMPP Control Panel.
  2. Open the httpd.conf file and change the default port from 80 to 8080.
  3. Open the HTTP-SSL.conf file and change the port from the default value is 443 to 4433.

Lastly, if you experience problems with XAMPP regularly, there are many other local development tools you can consider, such as DesktopServer, Docker, or Vagrant .

How to find the cause of an Error: Apache shutdown unexpectedly in Windows 10

Windows 10, an improved version of several Microsoft operating systems, has a huge following. It’s easy to use, provides added security, is compatible with most software programs, and most importantly, it keeps a record of every system activity. Many users have reported an automatic shutdown problem on their PC without any warning or reason. Using the system tracking feature of Windows 10 we can find out why your PC shuts down for no reason Windows 10.

Find out why the computer shuts down

The Error: Apache shutdown unexpectedly can occur in many ways; Sometimes putting your PC to sleep for a longer period can cause a random shutdown. The system may or may not notify you of the shutdown. In some cases, users have received a message about the sudden 10-30 minute shutdown requirement, even if all drivers are up to date. Let’s find out the root of this unexpected Windows 10 behavior. In this article, you will learn three methods by which you can find the cause of unexpected shutdown in Windows 10.

  1. Through the event viewer
  2. By using PowerShell
  3. Using command prompt

Let’s see them now in detail:

1] Through the event viewer

Error: Apache shutdown unexpectedly – To find the cause of the unexpected shutdown with Event Viewer, use the following tips:

Click Start, type Event Viewer, and then select the result at the top of the list.

After heading to the Event Viewer, expand Windows Logs from the left and then select System .

Now right-click on System and select the Filter current record option.

Within the Filter Current Record window, select the Filter tab. Then go to the All Event ID text box and enter the following identification number separated by a comma, as shown in the following snapshot.

  • 41: Indicates that your system has crashed, lost power, or is unresponsive, which in turn leads to an improper shutdown with the clean shutdown option.
  • 1074: This event is logged for manual shutdown or restart. It also applies to the event when the system automatically reboots to install new updates on your computer.
  • 6006 – Triggers after the installation of the new update, especially when the system is lost during the shutdown.
  • 6005 – This is an error that occurs when the system reboots.
  • 6008 – This event is a clear random auto-shutdown indicator, which may be due to error 41.

Now click on the OK button and then double click on a record to verify the information.

As soon as you complete the above steps, you will see the real causes of your device shutting down unexpectedly.

Read more: SSL_ERROR_NO_CYPHER_OVERLAP in Firefox: How to fix

2] When using PowerShell

Error: Apache shutdown unexpectedly – Another method to find the cause of the unexpected shutdown in Windows 10 is to use Windows PowerShell. So if you prefer a command-line interface instead of GUI, you can use the following instructions to do it:

Open an elevated PowerShell prompt

Once it opens, type the following command and hit

Get into:
Get-WinEvent -FilterHashtable @ {LogName = ‘System’; Id = 41, 1074, 6006, 6605, 6008; } | Format-List Id, LevelDisplayName, TimeCreated, Message

Go to the description section of the registry and know the possible causes and the time of the shutdown.

Let’s talk about them in detail. First, open an elevated PowerShell prompt. To do so, right-click on Start and select Windows PowerShell (administrator) option from the menu list.

If a UAC prompt is triggered and it asks for your permission, click the yes button.

Inside the elevated area of ​​the PowerShell app, copy and paste the following command and hit Enter:

Get-WinEvent -FilterHashtable @ {LogName = ‘System’; Id = 41, 1074, 6006, 6605, 6008; } | Format-List Id, LevelDisplayName, TimeCreated, Message

After running the above command, the possible causes and times for shutdown will be listed. To do this, you can go to the description section of the record and check them.

3] Use command prompt

Error: Apache shutdown unexpectedly – To find the actual cause and timing of your computer’s unexpected shutdown, follow the suggestions below:

Run the command prompt as administrator on your computer.

Type the following command and hit Enter:

wevtutil qe System / q: “* [System [(EventID = 41) or (EventID = 1074) or (EventID = 6006) or (EventID = 6005) or (EventID = 6008)]]” / c: 100 / f: text / rd: true

Now hit the Enter key and you’re done. You will see all the possible causes that led to your computer shutting down unexpectedly.

If you need, you can read the above steps in detail.

So to find the cause of your computer’s unexpected shutdown, you must first open an elevated command prompt.

To do so, right-click on the Start menu and open the Run dialog.

In the text field, type cmd to find the command prompt. Then press Ctrl + Shift + Enter to open the command prompt with administrator privileges. Also, click yes if a UAC message appears on the screen.

Now copy paste the following command line and hit Enter:

wevtutil qe System / q: “* [System [(EventID = 41) or (EventID = 1074) or (EventID = 6006) or (EventID = 6005) or (EventID = 6008)]]” / c: 100 / f: text / rd: true

If you want to see more or fewer event logs, you can do so by making some minor changes in the command line above. To do that, set / c: 100 to your preferred number and run the command again.

You will see the possible causes and times of the shutdown that occurred on your computer. You can go to the description section of the record and check them.

Read more: Fix: The uploaded file exceeds the upload_max_filesize directive in php.ini in WordPress

When using XAMPP, the Apache shutdown unexpectedly. Here is how to avoid the problem.

When using XAMPP, the Apache shutdown unexpectedly due to some problem while it was starting up. The Error message: Apache shutdown unexpectedly. is then displayed on the XAMPP control panel. The most common reason for this error is the inability of Apache to use ports 80 and/or 443. If another program is using one of the 2 ports, it is blocked, and Apache cannot run it. ‘use. There are then 2 solutions: make Apache the only program to use ports 80 and 443, or configure the Apache server to use another port.

If you want to make only Apache use ports 80 and 443, you must first detect which applications are using these ports. With the command-line tool (run in administrator mode), the netstat -abno command will display the list of processes on the platform as well as the port (s) used. If the process name does not allow you to identify the application, take the process PID. Then open the task manager (ctrl + alt + del keys). In the list of running programs, you can add the PID column (right-click on the column headers) and thus locate the faulty program.

The most common program that conflicts with Apache is Skype, which by default uses ports 80 and 443 to function. To modify the behavior of Skype, go to the options, Advanced tab, Connection option, then uncheck the Use ports 80 and 443 for additional incoming connections box, and finally, click on Save.

Another process that commonly blocks port 80 is the HTTP API service. To free port 80 then, open the command prompt in administrator mode and type the following command: net stop HTTP. The API will stop, and Apache will be able to use port 80.

If you want to leave port 80 occupied and run the Apache server on another port, you must modify the configuration files. Use the XAMPP control panel, and click on the config button located on the Apache row. Choose the Apache option (httpd.conf). In the file, modify the Listen 80 list to change the port used, and save the changes. If port 443 is the problem, choose the Apache option (httpd-SSL.conf), then in the file, modify the Listen 443 line to use a free port, and save the changes.

Once you have made changes to the files, click on the config button located at the top of the control panel, above the netstat button. In the Port and Services Configuration section, indicate the new ports that you entered in the files, then save the changes. You just have to restart Apache and verify that it starts without an error message.

 

 

For website maintenance service contact us

Posted by Rebecca
Follow:
Rebecca is an Independent content writer for breldigital, She writes content on any given topic. She loves to write a case study article or reviews on a brand, Be it any topic, she nails it
Leave a comment

Leave a Reply