95

I'm using XAMPP, and I can start Apache, but, MySQL (phpMyAdmin) start!

When I start, I get this error;

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

I search on it, and, change the port of Apache in Config -> Service and Port setting. I have;

Service name: Apache 2.4
Main port: 122
SSL port: 444

I also uninstall Skype (Windows 8/10/Metro version). Nothing is working. In the httpd.conf file I have;

Listen 122
ServerName localhost:122

I start it via apache_start.bat and get;

(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : AH00072: make_sock: could not bind to address [::]:445
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : AH00072: make_sock: could not bind to address 0.0.0.0:445
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

Please note that all the log files don’t exists! Skype is uninstalled.

7
  • Did you checked if the port is blocked?
    – Rizier123
    Dec 6, 2014 at 15:32
  • 1
    Try running as administrator as well Dec 6, 2014 at 15:36
  • 3
    Are you running skype when you are trying to enable apache? If so change skype settings.
    – iSaumya
    Dec 6, 2014 at 15:37
  • 3
    You cannot have localhost:80 and listen to port 122. Choose which port to listen to. Dec 6, 2014 at 15:37
  • Ok, I made some modification : @Rizier123 -> I check but I'm not sure if it's the good way. @Will-Campbell -> Yes, but nothing more. @iSaumya -> Skype is not on my computer. @Lorenz-Meyer -> I have now Listen 122 and ServerName localhost:122 Dec 6, 2014 at 20:22

25 Answers 25

229

Update: 15th May, 2018:

The latest Windows 10 update (re-)activated the World Wide Web Publishing Service (in German: WWW-Publishingdienst). This might depend on the options you select during the configuration of the update you can make afterwards.

Update: 4th August, 2015:

If you have done clean installation of Windows 10, you may not have the Word Wide Web Publishing Service. In that case, simple WAMP/XAMPP installation should work fine.

If it doesn't, try installing Visual C++ Redistributable and then re-install WAMP/XAMPP.


I was facing a similar problem with WAMP. In Windows 10 TP, the Word Wide Web Publishing Service comes pre-installed. This is related to IIS and you can remove it if you don't need it.

This blocks the port 80, making Apache act weirdly. You can do the following and try again.

  • Go to Start, type in services.msc
  • Scroll down in the Services window to find the World Wide Web Publishing Service.
  • Right click on it and select Stop.

This should make port 80 free and restarting WAMP/XAMPP should get you up and running!

There are other ways to do fix this. See Make WAMP Work On Windows 10.

14
  • 7
    What if I don't have "World Wide Web Publishing Service" as a service listed? Jul 31, 2015 at 6:11
  • 6
    The name of the service is W3SVC while the description is World Wide Web Publishing Service. I initially did not think I had the service because I was not seeing the service described when sorting by name.
    – Jake Z
    Aug 7, 2015 at 2:04
  • 1
    Yea, I had this problem as well, it kept telling me "A process witha PID of 4 is using port 80" when I checked it, the process name was "System". I kept thinking I could mess up my PC if i tried stopping this process. But this worked perfectly. Thanks Aug 20, 2015 at 11:06
  • 1
    For those outthere using the Uniform server Z (which is great!), I can confirm this working for that server too.
    – MisterM
    Mar 14, 2016 at 17:23
  • 1
    @PraveenPuglia hum.. interessant comment, work to me! i try remove file "ntoskrnl.exe" is a cause port 4 ... much google search say virus... nice services to stop is work lol.. thanks bro
    – KingRider
    Jun 23, 2016 at 15:59
40

Solving this problem is easy:

  1. Open a command prompt with administrator privileges
    • Find "cmd", right-click on it, then select "Administrator".
  2. In the prompt, type net stop W3SVC and Enter.

You can now click in WAMPP and restart all services. Open your browser and navigate to "localhost".

If you need to start W3SVC again,

  1. Open a command prompt with administrator privileges
  2. In the prompt, type net start W3SVC and Enter.
5
  • On the released version of Windows 10, I get "System error 3 has occurred. Access is denied."
    – Mike_Laird
    Aug 6, 2015 at 18:08
  • You need be administrator. Try again.
    – DIANGELISJ
    Aug 8, 2015 at 11:41
  • Yep, thanks DIANGELISJ. In Windows 10, a right click on cmd and then your instructions above, then a right click on httpd.exe and I got Apache working again. The httpd.exe box is a black blank, but Apache works.
    – Mike_Laird
    Aug 17, 2015 at 17:55
  • I had the same problem on Windows 10 using XAMPP. After each restart I would have to go to the XAMPP control panel and reinstall and start the Apache and MySQL services again. Running the XAMPP control panel as administrator seems to have cured it, thanks!
    – SharpC
    Sep 23, 2015 at 12:08
  • this is the correct answer, all you need to do is to shut down IIS, and then start xampp. Control-Panel - Admin - Internet Information Services - "Stop" That's it. Easy as pie. ( same thing as above, just through interfaces.) Nov 15, 2015 at 5:12
17

I found a way to solve this problem:

  1. If you are using Skype as well, uncheck the field stating to use ports 80 and 443 (Extra -> Settings -> Advanced -> Connections -> Uncheck Port 80 and 443)
  2. Restart Skype and XAMPP.

If this does not work,

  1. Go to Start and type "services.msc"
  2. Locate "World Wide Web Publishing Service"
  3. Right-click on that entry, select "Stop", then restart XAMPP.

If that did not work and "World Wide Web Publishing Service" was not available,

  1. Go to the Control Panel, navigate to "Uninstall Programs", then "Turn on/off Windows features"
  2. Locate "Internet Information Services"
  3. Click the checkbox and hit "OK".
  4. Restart, then repeat the second approach (services.msc)
3
  • Thanks, but the answer is already answered. Maybe it could help someone ese (: Aug 27, 2015 at 18:48
  • Your answer could not help me , i figured out my own solution . Thanks anyway :)
    – Fazal
    Aug 28, 2015 at 5:54
  • 1
    Brilliant! It was just Skype blocking Apache! My favourite part of the process: after turning off Skype's ports 80 & 443, I had to quit out of Skype. A warning came up saying (paraphrased) "If you quit Skype you won't be able to use it." Well, duh!
    – CJ Dennis
    Jan 13, 2016 at 22:53
15

You can change the port of Apache:

  1. Go to C:\xampp\apache\conf\httpd.
  2. Find by combination Ctrl+F line #Listen 12.34.56.78:80 and change the 80 to any you like for example 81
  3. The same with Listen 80 change to 81
  4. The same with ServerName localhost:80 change to 81.
  5. Go to C:\xampp\apache\conf\extra\httpd-vhosts and change 80 to 81

NameVirtualHost *:80 here

VirtualHost *:80 and here (two times)

  1. Restart Apache

To enter your web page, type: http://localhost:81/index.html

3
  • I will recomend this one
    – niz_sh
    Dec 3, 2019 at 7:09
  • Does changing commented line really make sense ? (step 2 #Listen 12.34.56.78:80) Aug 14, 2021 at 16:01
  • easy peasy, thanks! Dec 7, 2021 at 5:17
5
  1. Press Windows+R, and type regedit.

  2. Go to

     HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
    

    Change the value of Start to 4, which means disabled.

  3. Reboot your computer.

1
  • 1
    The Windows 10 "November Upgrade" caused my issue - all had worked before on the older version of Win 10. I didn't have W3svc running or Skype. This solution did the trick! Thanks @Do Nhu Vy!
    – Jim M
    Aug 19, 2016 at 11:07
5

I have fixed this issue with mine as well, but I had to change a couple of things. I require that on my Windows 10 machine I keep my C# and Visual Studio development environment, so I didn't want to tinker with any services. All I had to do was download the latest version of XAMPP and change the listening ports for 80 and 443. They were located in two files:

C:\xampp\apache\conf\httpd.conf

Listen 122
ServerName localhost:122

C:\xampp\apache\conf\extra\httpd-ssl.conf

Listen 444

Changing the above from port 80 to 122 and 443 to 444 allowed me to have Apache run and serve pages while keeping everything else the same for my ASP.NET development. Hopefully this helps someone out there. In the end this is a very simple fix.

Direct your browser to: http://localhost:122

2
  • I think this is the easiest and simplest way. Thank you so much! Jan 31, 2018 at 20:00
  • +1 because shutting down .NET Services is definitely no option for me. Of course I want to run IIS and Apache at the same time!
    – Alan
    Jul 16, 2019 at 21:51
4

I got same problem, but the previous solutions leads us to change the port instead of getting the exact solution. I've searched about the ports of simple HTTP & HTTPS Protocols and found.

If another application is already running, the HTTP or HTTPS ports on the local machine, we'll get this problem obviously just because of those ports already in use and in a busy state.

That's why after changing the port number it was working. But instead of changing the port in the XAMPP server, I've used the following methods and it works for me.

Here's the following step which I've got during this fix up.

  1. Error which I got in XAMPP Server application.

    XAMPP Server Error

  2. At the top corner there's a button named Netstat. It's very useful for looking up the running ports on the system.

    Netstat button

  3. This is the Netstat application where I found an application already running and using the port number 443. In my case, it was vmware-hostd.exe. Your might be a different application. Try to search for port 80 (HTTP) or port 443 (HTTPS).

    Netstat application opened

  4. I just opened the Windows Task Manager, selected that application vmware-hostd.exe, and killed the process by using the End Process button. I've killed that process which was used port 443. And this application wasn't needed at the moment.

    Opened task manager and kill that application

  5. After killing the application in Windows Task Manager, Apache is now available at the moment. Here's the proof.

    Apache working


NOTE: *If you found any kind of application which is used the HTTP or HTTPS ports means port 80 or port 443 and the application isn't important or not vital then only kill the process of that application.

Otherwise, there isn't any need to follow these steps. Then you need to consider to change the port of your XAMPP application as stated in the previous answers.*

4

I tried everything listed in the answers here but none of them worked.

Then all I did was to re-start XAMPP with administrator rights by:

Start menu - right click on XAMPP - select run as administartor

It worked. It is that simple.

I uninstalled IIS services, stopped WWW services, changed ports back to 80, blocked all apache and mysql connections from windows 10 firewall, but yes it still works!

0
3

It looks like there are many options. The answer depends on your Windows installation. Here is my experience when having the same problem in a Windows 10 fresh install and fix the issue with the following step:

  1. Install Visual C++ Redistributable
  2. Open XAMPP and select configure in the Apache service
  3. Change the port 80 to 9000 or 81 or whatever you want in file httpd.conf on the line Listen 80
  4. Change the port on httpd-ssl.conf and change Listen 443 to Listen 441
  5. Restart XAMPP and start the Apache service. It works for me.

Note: I'm using XAMPP version 5.6.15 and XAMPP Control Panel version 3.2.2.

1
  • 2
    Good catch - ensure the http and https ports are not in conflict Mar 17, 2017 at 2:34
3

enter image description here

Change the port number which port are available in your system By following ways

1. First open the Apache “httpd.conf” file:

#Listen 12.34.56.78:80
Listen 80
ServerName localhost:80

to

#Listen 12.34.56.78:8080
Listen 8080
ServerName localhost:8080

2. Open httpd-ssl.conf:

Listen 443
<VirtualHost _default_:443>

to

Listen 441
<VirtualHost _default_:441>

3. Follow the trick. Now “Start” Apache and if everything goes well, your Apache server should start up.

1
  • thx , worked for me , but now i cant start that sql server ;), but thx
    – gungott
    Jan 10, 2021 at 21:21
2

After playing around, really all you have to do is change two lines in the httpd.conf file:

Change "Listen 80" to "Listen 122" (or anything else you want)

and

"ServerName Localhost:80" to "Localhost:122" (or the port you changed above)

Then it all should fire right up :P

2

The World Wide Web Publishing service was not the only one responsible in my case.

I have IIS installed, so I had to stop the whole HTTP service.

These are the commands that I've executed in CMD (as administrator):

net stop W3SVC
net stop http
1
  • Go to the start menu, and type Turn Windows features on or off
  • Uncheck Internet Information Services
  • Press OK
1

Actually, by default IIS (Microsoft, .NET, etc.) is installed.

  • Go to Control Panel
  • Turn Windows features on or off...
  • Under (IIS) Internet Information Services, uncheck the (WWWS) world wide web services.
  • Click OK.

This could be a permanent solution. :)

1

This advice was great. I had the same problem, but my solution was different, because I was so stupid, that I have renamed directory where XAMPP was located and since I had installed a lot of another programs I couldn't rename it back.

In my case there was original directory C:\Programs\Xampp and renamed it to C:\PROGRAMS_\Xampp and that was the mistake.

The solution was to find all references on C:\Programs and rename them C:\PROGRAMS_ in the XAMPP directory, because for some reason during the installation it writes absolute paths, not relative. Of course, there are some references in the registry too.

2
  • This seems to be a very specific case and does not seem to correspond with the scenario of the question.
    – dakab
    Nov 11, 2015 at 18:36
  • Yes I agree, but I think it may help someone, because I was facing the same situation (had fresh windodw 10) and the error was the same, so maybe this is not exactly the same scenario, byt I think someone colud find this helpful.
    – Mayk
    Nov 12, 2015 at 11:06
1

It's simply a matter of making port 80 available for your Apache service. The way I solved the problem was:

  1. On Windows 10, right click the start button and select Run
  2. Type services.msc and click OK
  3. Find and right click World wide web publishing service
  4. Select Properties
  5. Change the Startup type value to Automatic (Delayed Start)
  6. Restart your computer.

There you have it. All is back to normal.

1

In my case it was a simple case of removing IIS because Windows 10 comes with IIS (Internet Information Service) pre installed - that conflicts with XAMPP because these both servers try to use the port 80. If you don't want to use IIS and keep using XAMPP

  1. Go to run/search in Windows 10
  2. Search for 'optional features'
  3. On that list untick Internet Information Service (IIS)

Then restart.

1

That was simple for me!

Try to run the XAMPP Control Panel as administrator.

1

I have tried all the above solutions. But it was not working in any way.

Finally, I just uninstalled XAMPP and installed it again. Then it worked for me.

Now I am able to run the server on any port (including 80).

1

I found that running apache_start in gave me the exact error and on which line it was.

My error was that I left a space in between localhost: and the port.

2
  • What is "running apache_start in"? For example, is a word missing? Aug 21, 2020 at 18:20
  • Copy-paste works better than typing (unless of course GNOME is used - avoid GNOME at all cost). Aug 21, 2020 at 18:20
1

If you have installed SQL Server, some of its services may block the port which XAMPP needs. I solved my problem by disabling SQL Server Reporting Services and now Apache starts without any problems.

Just open the services.msc, scroll down, and find SQL Server Reporting Services. Right click on it and click Stop.

1

Steps:

  • Open the XAMMP Control Panel
  • Open Apache Config, and then select the Apache - xammp- configuration file
  • Search for "Port 443", and then change it to some other port, let’s say 4433
  • Then restart.
0
1

Check if your PHP installation works.

Check which php.ini file you are running in Apache's configuration and use it to run php.exe...

1

You may just have updated your Windows to Version 1903 (OS Build:18362.239) or have changed user passwords. Despite having eliminated all port conflicts, I still kept getting the messages described by the OP at the very start of this post.

In the end I cured it by upgrading to XAMPP to 7.3.7. (When forced to reinstall, you might as well upgrade at the same time!)

But the problem reoccurred when I again went to change the 'root' user password.

The console error messages were masking the fact that table mysql.user was corrupt.

Check file mysql_error.log. If you are seeing Fatal error: Can't open and lock privilege tables: Index for table 'user' is corrupt; try to repair it, then have a look at this.

1

I got the same problem and I solved it by uninstalling WAMP server.

Not the answer you're looking for? Browse other questions tagged or ask your own question.