XAMPP: Couldn't start Apache (Windows 10)

前端 未结 25 1965
长情又很酷
长情又很酷 2020-11-30 19:26

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

When I start, I get this error;

10:07         


        
相关标签:
25条回答
  • 2020-11-30 19:30
    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.

    0 讨论(0)
  • 2020-11-30 19:30

    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.

    0 讨论(0)
  • 2020-11-30 19:30

    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).

    0 讨论(0)
  • That was simple for me!

    Try to run the XAMPP Control Panel as administrator.

    0 讨论(0)
  • 2020-11-30 19:31

    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.

    0 讨论(0)
  • 2020-11-30 19:32

    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

    0 讨论(0)
提交回复
热议问题