XAMPP - Apache could not start - Attempting to start Apache service

后端 未结 20 1738
悲哀的现实
悲哀的现实 2020-12-31 09:27

While trying to start Apache using XAMPP, I was receiving - \"Attempting to start Apache service...\" message in XAMPP UI. No further details were availabl

相关标签:
20条回答
  • 2020-12-31 09:52

    I had the same problem but was because I had already previously installed xampp , and I tried to install a newer version , then I installed the newer version in another file directory (I named the file directory xampp2). I solved the problem after uninstall the newer version, rename the old one (I renamed as xamppold), and installing xampp again.

    I guess if you didn't installed xampp in another file directory or something like that , it should be enough to reinstall xampp. If you are worried about your files , you always can make a backup before reinstalling xampp.

    I solved the problem after watching the xampp activity log (the list of the bottom) and realizing xampp was tring to open the coustom file path but I had another route path. If the first option didn't worked, at least you can scroll up in the activity log and see whats the error you get while starting as admin and trying to re install the Apache module or trying to start the module.

    You may wander why I didn't just simply uninstall the whole thing from the beginning , and the answer would be I have tweak a couple of things of xampp for some different projects (from changing the ports , to add .dll to run mongo.db in Apache), and I'm just too lazy to re-do everything again :b

    I hope my answer can be helpful for anyone since is my first time writing in stackoverflow :)

    Cheers

    0 讨论(0)
  • For those who have accidentally (or not) changed one of the .conf files and apache does not run even after trying all the above solutions.

    One easy way to track where the issue is located, is to run Apache via command prompt:

    (On windows) : open command prompt as admin then navigate inside the bin folder of Apache , next run

    httpd in order to run apache

    C:\xampp\apache\bin\httpd

    For my case it was :

    someone had added a virtual host in the specific file that caused the problem . I commented the lines and Apache ran fine.

    0 讨论(0)
  • 2020-12-31 09:57

    For me it wasn't a port or service issue; I had to re-run the XAMPP setup script. Although this didn't directly fix the issue for me, the script was much more verbose than the XAMPP log, pointing me in the right direction to actually solve the problem.

    From the XAMPP GUI, click on Shell, type set, press Tab to autocomplete to the setup_xampp.bat file, and then press Enter to run it.

    In my case I got the following output:

    [ERROR]: Test php.exe failed !!!
    [ERROR]: Perhaps the Microsoft C++ 2008 runtime package is not installed.
    [ERROR]: Please try to install the MS VC++ 2008 Redistributable Package from the Mircrosoft page first
    [ERROR]: http://www.microsoft.com/en-us/download/details.aspx?id=5582
    

    This particular error is misleading. Although it specifies the Visual C++ 2008 Redistributable Package, PHP 7.4.x requires the Visual C++ 2019 Redistributable Package.

    After installing that and following the prompt to restart, sure enough I'm now able to start Apache as normal.

    0 讨论(0)
  • 2020-12-31 09:58

    Check your DocumentRoot path (in httpd.conf); a typo there can cause this problem.

    0 讨论(0)
  • 2020-12-31 09:58

    I had the same issue, executing "setup_xampp.bat" in xampp folder solved my issue.

    0 讨论(0)
  • 2020-12-31 09:58

    when i run xampp control panel normal:

    I had been run

    I can’t start apache So, I will run it with administrator:

    I can run apache

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