Xampp windows error apache shutdown unexpectedly

How To Fix XAMPP – Error: Apache shutdown unexpectedly

I have been using XAMPP as my developmental server for years now. I have come to love it simplicity and effectiveness which is why I still haven’t use other alternatives like Wamp and EasyPHP.

Few days ago, I started Apache on XAMPP and to my surprise it will run and stop and afterward displays the below error message;

Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Check the “/xampp/apache/logs/error.log” file
and the Windows Event Viewer for more clues

From the error message my hypothesis was another program is already using the port 80 . My hypothesis was proven to be true reading this stackoverflow thread.

If you are experiencing this problem with XAMPP, I am going to share two simple yet effective methods that solved this problem for me.

Changing XAMPP Default Port

If you are desperate to get XAMPP up and running, you should consider changing the port from the default 80 to say 7777 .

✔ In the XAMPP Control Panel, click on the Apache – Config button which is located next to the ‘Logs’ button.

✔ Select ‘Apache (httpd.conf)’ from the drop down. (Notepad should open)

✔ Do Ctrl+F to find ’80’ and change line Listen 80 to Listen 7777

✔ Find again and change line ServerName localhost:80 to
ServerName localhost:7777

✔ Save and re-start Apache. It should be running by now.

The only demerit to this technique is, you have to explicitly include the port number in the localhost url. Rather than http://localhost it becomes http://localhost:7777 .

Stop the application / service using the 80 port

If you do not want to run XAMPP in another port, and still want to continue using the default port 80, you need to find and stop the program or application already using the port.
One of such program is the popular Skype .
Navigate to Tools -> Options… -> Advanced -> Connection; uncheck / un-tick the use port 80 and 443 as alternative for incoming connection.
Quit Skype for the change to take effect and then re-start Apache in XAMPP.
It should be up and running.

If after performing the ritual above and it Apache refuse to run just like I experienced, then it is very likely that another program is still using the port 80. It was Microsoft IIS’s Web Deployment Agent Service in my case.

To find the program running port 80 conflicting with XAMPP, click the Netstat button at the far-right. You will see a list of programs together with their respective running port and PID.

Alternatively run CMD and enter netstat -aon

Find the program running port “80” and take note of it PID.
Open Windows Task Manger ( Ctrl+Alt+Del ), take cognizance of program name with the PID.

Читайте также:  Как посмотреть сколько памяти видеокарты windows 10

To stop the conflicting program, just Open SERVICES.MSC (in windows 7, it just “services” with a gear icon) or run CMD , enter services.msc and stop the program.

Mind you, if you find the conflicting program in Windows Task Manger, you can just right-click and stop the service.

Now that the program has been stopped, re-start Apache and XAMPP should work fine.

SLUSAR.SU

Логово Программиста

Ошибка XAMPP не запускается APACHE. Решение.

Если у вас возникла подобная ошибка на OpenServer, вот РЕШЕНИЕ.

Если вы используете XAMPP в качестве настольного сервера для разработки web приложений, то наверняка рано или поздно столкнетесь с проблемой запуска сервера Apache. Зачастую это связано с тем, что какое-то приложение заняло порт 80. В основном — это Skype. Но иногда даже отключение скайпа не возвращает сервер к жизни и вы все равно видите эту ошибку:

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

Решение этой проблемы имеется. Для начала можно попробовать изменить порты.

Запускаем Xampp, жмем Config и в появившемся окне выбираем Service and Port Settings где и меняем порты.

Но, и это не всегда помагает, поэтому нужно внести изменения в конфигурационный файл Apache.

Для этого жмем на Config напротив Apache и выбираем первый пункт Apache(httpd.config), где находим строчки:

#Listen 12.34.56.78:80
Listen 80

И заменяем их на:

#Listen 0.0.0.0:80
#Listen [::]80

После чего еще раз пробуем запустить Apache и убеждаемся, что все работает.

Лучше использовать порт 8080, если и это не работает, плюс у вас стоит windows 10. Тогда придется отключать порт 80 в ручную.

netstat -o -n -a | findstr 0.0:80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
это бывает и на ХР и 7 и 8

также процесс может занимать skype iis sgl — проверьте их сначала

Этот способ я нашел тут https://toster.ru/q/235880

21 идей о “ Ошибка XAMPP не запускается APACHE. Решение. ”

Спасибо за статью, помогло. после правки httpd.config, Кстати маленькое замечание у меня файл назывался httpd.conf XAMPP v.3.22

+
помог вариант
#Listen 0.0.0.0:80
#Listen [::]80

#Listen 0.0.0.0:80
#Listen [::]80

помог этот вариант!

Спасибо, в httpd.config не было «#» во второй строке после Listen, и порт пришлось поменять на 8080

Спасибо ,тоже помог вариант как с Listen

Спасибо огромное. Помогло)))))

У меня виртуальная машина VMVARE занимала порты, убив процесс АПАЧ запустился

15:50:27 [Apache] Status change detected: stopped
15:50:28 [Apache] Problem detected!
15:50:28 [Apache] Port 80 in use by «Unable to open process» with PID 4!
15:50:28 [Apache] Apache WILL NOT start without the configured ports free!
15:50:28 [Apache] You need to uninstall/disable/reconfigure the blocking application
15:50:28 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
15:50:28 [Apache] Attempting to start Apache app…
15:50:28 [Apache] Status change detected: running

К сожалению, не помогло ничего
Win 7 SP1
VMWare 12
xampp-win32-7.1.4
Самостоятельно и без проблем запускается Apache x86 1.3.41
Придется жить так…

Можно порты поставить 8080 и 4433 на апач и ссл в httpd.conf и httpd-ssl.conf.
Если не запускается апач даже после смены портов, попробуйте в командной строке запустить c:\xampp\apache\bin\httpd.exe (или ваш путь к httpd.exe).
Покажет, где ошибка — у меня банально тег не закрытый в httpd-vhosts.conf был, в логах xampp этого видно не было.

Читайте также:  Как слышать себя через микрофон windows 10

Спасибо за совет, запуск в командной строке помог найти ответ)

как и где закрыть тег ?

Спасибо за совет! Помогло разобраться

Спасибо большое, мне помог первый этап.
Всё заработало, после:

И заменяем их на:

#Listen 0.0.0.0:80
#Listen [::]80

Starting Apache Web Server…
/opt/lampp/apache2/scripts/ctl.sh : httpd started

Подскажите шото мне делать?

Столкнулся с этой проблемой после обновления и улучшения версии. Помогло #Listen 0.0.0.0:80
#Listen [::]80
Спасибо.
ps Хотя я снес и скайп и реестре перепрописал все ))) и порты другие поставил )))

Слишком мудрено, просто заремте строчку решеткой
#Listen 80
а эти строчки вообще не участвуют в работе
#Listen 0.0.0.0:80
#Listen [::]80

Сработал вариант отключать порт 80 в ручную.

Win+R вводим “regedit”
1)Ищем ветку «HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP»
2)Меняем значение ключа “start” с 3 на 4…иногда помогает 0
3)Создаем параметр типа Dword c именем «NoRun» и присваиваем ему значение «1» без кавычек.
4)перезагружаемся

Благодарю за помощь! Помог способ с реестром.

Здравствуйте, как только устанавливается WordPress и предлагает открыть сайт,Апачи сразу же сам выключается,что делать ?(

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.

Apache shutdown unexpectedly

I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 — NT Kernel & System.

I know by using a different port (such as port 8080 etc change in httpd.conf) will get to a workaround for this issue. However I need port 80 to be released by PID 4 process and allocated to Apache service. I have done that in the past but have forgotten the resolution steps over the time. Please help me fix it

This is the error I am encountering while starting Apache

Logs from apache error log file:

NOTE: I DO NOT HAVE IIS, WEB CLIENT, WORLD WIDE WEB SERVICE.

17 Answers 17

on your XAMPP control panel, next to apache, select the «Config» option and select the first file (httpd.conf):

there, look for the «listen» line (you may use the find tool in the notepad) and there must be a line stating «Listen 80». Note: there are other lines with «listen» on them but they should be commented (start with a #), the one you need to change is the one saying exactly «listen 80». Now change it to «Listen 1337».

Start apache now.

If the error subsists, it’s because there’s another port that’s already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):

there, look for the line «Listen 443» and change it to «Listen 7331».

Start apache, it should be working now.

If you are using the latest Skype, go to:

Tools -> Options -> Advanced -> connection.

Disable the ‘Use port 80 and 443 for alternatve.. ‘
Sign Out and Close all Skype windows. Try restart your Apache again.

Читайте также:  Серийный номер для windows sp3

You shuld run file setup_xampp.bat in XAMP folder first!

    open your xampp control panel then click its «config»

choose the «Apache (httpd.conf)» and find this code below and change it into this one:

save it (ctrl + s)

after that, go back to xampp control panel and click again its config

choose «Apache (httpd-ssl.conf)» find this code below and change it again:

save it (ctrl + s)

then, click the «config» (note: above the netstat) and click the «service and port settings» then save both of it.

finally, go to the «control panel» -> «Programs & Features» -> «Turn Windows On or Off».

Uncheck your «Internet Information Services» then click ok.

Just wait for it and your computer/laptop will be automatically restart and try to open again your xampp control panel then start your Apache.

It means port 80 is already used by another one.

Simply follow these steps:

  1. Open windows -> click on Run (win + R) -> type services.msc
  2. Goto IIS Admin -> Right click on it and click on Stop Option.
  3. Open XAMPP click on Start Action of Apache Module, Apache Module is run.

OR

For find the port of Apache (80) in Command Prompt simply type netstat -aon it displays present used ports on windows, under Local Address column it shown as 0.0.0.0:80. If it displays this port another connection is already used this port number.

Active Connections in Windows XP:

I solved my problem after installing xampp-win32-1.6.5-installer previously I used xampp version xampp-win32-1.8.2-0-VC9-installer at that time I got this error. Now it resolved my problem.

Apache is not running from XAMPP Control Panel ( Error: Apache shutdown unexpectedly. This may be due to a blocked port)

I have installed XAMPP (xampp-win32-1.8.2-0-VC9-installer.exe) on Windows 7 successfully. But unfortunately, the following error was found during running Apache from XAMPP Control Panel:

26 Answers 26

There are many possible answers for this problem. The most common and most likely is that you’re running another program which is blocking port 80 or 443. If you’ve installed Skype, then you’ve found your problem! Change apache’s port settings to 81 and apache will work. There’s a good tutorial on that To check this you can open up your command line by clicking the start menu, and typing ‘cmd’, and enter the command

this wil return a list of programs that will vaguely resemble this pattern

You need to find a line (or lines) ending in :80 and terminate them in order to start apache. If there is no line ending in :80, there are more things you can do.

First, navigate to xampp’s directory (default is c:\xampp) and double click apache_start.bat. This will open up a comand line and return more detailed errors about why apache can’t run. Mostly, be looking for syntax errors that you could’ve created by editing your httpd.conf, or httpd-ssl.conf files. This is very easy to do if you’ve edited it and are a new user.

If still this fails, your last hope is to check the apache error log by clicking on the logs tab in apache’s row in the xampp control panel and clicking error log.

If none of this works, don’t give up! You got this!

Оцените статью