Меню

Xampp ошибка apache shutdown unexpectedly

As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.

As the port is not used by Skype, but by some other internal applications,
I followed the below steps to resolve the issue:

Step 1 — From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).

Inside the httpd.conf file, somehow I found a line that says:

Listen 80

And change the 80 into any number / port you want. In my scenario I’m using port 8080.

Listen 8080

Still from the httpd.conf file, I found another line that says:

ServerName localhost:80

Change 80 to 8080.

ServerName localhost:8080

Step 2 — From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says

Listen 443

And change the 443 into any number / port you want. I’ll using 4433 as the new port number.

Listen 4433

Still from the httpd-ssl.conf file, find another line that says

<VirtualHost _default_:443>

ServerName localhost:443

And change 443 to 4433.

<VirtualHost _default_:4433>

ServerName localhost:4433

Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.

Here we will discuss the Error: Apache shutdown unexpectedly issues with XAMPP. In this complete article, we will know why the Apache and MySQL issue occurs and how we can solve them easily or without editing the configuration files.

Error: Apache shutdown unexpectedly
Error: Apache shutdown unexpectedly

Also Read: Increase PHPMyAdmin Import Size Ubuntu and XAMPP

In This Article

  • 1 Why this “apache shutdown unexpectedly” xampp occur
  • 2 [Solution] error: apache shutdown unexpectedly xampp occurs
    • 2.1 Related

Why this “apache shutdown unexpectedly” xampp occur

After installing the XAMPP server, here are some major points that may cause the apache error,

  • Default ports are used by other resources or software.
  • Any other apache server is running on the same port. (You can check it by using your Task Manager)

[Solution] error: apache shutdown unexpectedly xampp occurs

Here is the complete step-by-step solution without editing the configuration file.

Step: 1

Open XAMPP with administrator permission.

XAMPP Run as Administartor
XAMPP Run as Administartor

Also Read: Send Mail From Localhost in PHP Using XAMPP

Step: 2

Click on the “Config” button,

Step – 3

Now click on “Service and Port Settings“, now you can see the Apache port setting on the following image.

XAMPP Service and Port Settings

Here you can set Port numbers according to your requirements and then hit the “SAVE” button.

You can do it for MySQL as well.

After completing these steps, you can now Start your Apache and MySQL both correctly.

This is the complete and most easy method to solve the error: apache shutdown unexpectedly xampp issue on windows systems.

You can download XAMPP from here Download XAMPP (apachefriends.org) as well.

I hope this can help you.

Also Read: How to Execute PHP File From Command Line

Happy Coding..!

Was this article helpful?

YesNo

Xampp Error

Are you getting the error “Apache shutdown unexpectedly”? Well, this article will help you sort this problem and carry on with your work.

PM 04:22:16  [Apache] Attempting to start Apache app…
PM 04:22:18  [Apache] Status change detected: running
PM 04:22:20  [Apache] Status change detected: stopped
PM 04:22:20  [Apache] Error: Apache shutdown unexpectedly.
PM 04:22:20  [Apache] This may be due to a blocked port, missing dependencies,
PM 04:22:20  [Apache] improper privileges, a crash, or a shutdown by another method.
PM 04:22:20  [Apache] Press the Logs button to view error logs and check
PM 04:22:20  [Apache] the Windows Event Viewer for more clues
PM 04:22:20  [Apache] If you need more help, copy and post this
PM 04:22:20  [Apache] entire log window on the forums

First, check which process is running in your port 80. try the following command in your terminal

net stop http

The above command will stop the process which is using your port 80.

If you are not interested in stopping that process and you want it to be running. Then you have to change the port for apache server. Below are the steps to change the port of apache

STEP #1: 
Open the XAMPP Control Panel as administrator.

STEP #2:
In the XAMPP Control Panel, Left click on the Config button corresponding to Apache

STEP #3:
Select ‘Apache (httpd.conf)’ from the drop-down menu. Notepad will open.

STEP #4:
Find Listen 80 and convert it to Listen 81.(or some other port number as per your wish) 

NOTE: When you try to run xampp you should use “localhost:81/dashboard/” instead of “localhost/dashboard/” 

STEP #5:
Find ServerName localhost:80 to ServerName localhost:81

STEP #6:
Save the notepad. Be sure that you can save the notepad file only if you open the XAMPP control panel as an Administrator. Now, start the Apache. It will run now.
If you have any problem regarding this, mention it in comments. I will try to solve your problem.

Update:

If you are using Skype, do the following steps:

Open Skype
Tools -> Options -> Advanced -> Connection
Uncheck the “Use port 80 and 443 for alternatives for incoming connections” checkbox
Sign Out and Close all Skype windows
Restart your Apache

Перейти к содержимому

Ошибка была вызвана двумя причинами:

1) Skype занимал 80 и 443 порт. Решается она так: Skype>Инструменты>Настройки…>Дополнительно>Соединение. Снять галочку напротив «Для дополнительных входящих соединений следует использовать порты 80 и 443». Другой путь решения проблемы — менять порты в настройках Xampp и apache

2) Синтаксические ошибки в httpd.conf. При этом файлы error.log и access.log были пустые. Ошибки удалось увидеть толко благодаря прямому запуску apache через консоль: C:xamppapachebinhttpd.exe

Полный текст ошибки:

15:58:23  [Apache]     Error: Apache shutdown unexpectedly.
15:58:23  [Apache]     This may be due to a blocked port, missing dependencies,
15:58:23  [Apache]     improper privileges, a crash, or a shutdown by another method.
15:58:23  [Apache]     Press the Logs button to view error logs and check
15:58:23  [Apache]     the Windows Event Viewer for more clues
15:58:23  [Apache]     If you need more help, copy and post this
15:58:23  [Apache]     entire log window on the forums

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Xbox live код ошибки 80151103
  • X7 oscar edition ошибка line 0