XAMPP, Apache - Error: Apache shutdown unexpectedl

2019-01-02 19:25发布

I've just re-installed XAMPP, and when I try to start my Apache server in the XAMPP Control Panel, I now get the following errors:

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

How do I solve this?

标签: apache xampp
30条回答
只若初见
2楼-- · 2019-01-02 19:52

When I found that there was no process using port 80 by using commands

netstat -abno | find ":80"

there was not a problem of any process using port 80.

Then I ran command (in cmd)

C:\xampp\apache\bin\httpd.exe

it showed some error in the virtual hosts configuration in httpd-vhosts.conf file which was recently edited by me for installation in a WordPress PHP environment in the Eclipse IDE. So I deleted those lines and Apache started perfectly.

查看更多
深知你不懂我心
3楼-- · 2019-01-02 19:52

This error occurs because the port, which is allocated for Apache, is used by another program. To check the application which uses the port, which we allocated for Apache, it can be had by clicking,

Netstat button.

XAMPP homepage

This is the Netstat file,

Enter the image description here

At first, I have allocated port 8080 for Apache, and I recently installed Oracle DB.TNSLSNR.exe has used 8080 port now.

So, by looking at this file we can choose a port which is not clashing with other applications. In my case, port 8060 is not clashing with any application. By selecting that we can change the httpd.conf file (XAMPP control panel -> Config) as mentioned above.

查看更多
临风纵饮
4楼-- · 2019-01-02 19:52

Note that whenever you change the default ports, your browser will not know about that. 80 and 443 seem to be standard in some way, so for example, if you changed 80 to 8080, you'll have to access your websites this way then:

localhost:8080/path_to_your_website.php

查看更多
冷夜・残月
5楼-- · 2019-01-02 19:52

Best Solution for windows user is :

  1. Open netstat (from XAMPP CONTROL PANEL)
  2. Find PID of process which uses port 80.
  3. Open CMD with Administrative.
  4. Run taskkill /pid PID (instead PID use pid u found from netstat)
    Heyy enjoy u Done.....
查看更多
冷夜・残月
6楼-- · 2019-01-02 19:53
  1. download new xampp apachefriends
  2. install it
  3. remove all VPN app
  4. open folder XAMPP run setup_xampp.bat
  5. run xampp-control.exe
查看更多
浅入江南
7楼-- · 2019-01-02 19:53

For me, this problem began when I hosted a VPN-connection on my Windows 8 computer.

Simply deleting the connection from "Control Panel\Network and Internet\Network Connections" solved the problem.

查看更多
登录 后发表回答