14

Hej, I have problem with:

Apache Service detected with wrong path

4:31:33 PM [Apache] Change XAMPP Apache and Control Panel settings or
4:31:33 PM [Apache] Uninstall/disable the other service manually first
4:31:33 PM [Apache] Found Path: "C:\Apache\bin\httpd.exe" -k runservice
4:31:33 PM [Apache] Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice

How to fix it? In advance, thank you.

1
  • @SLoboan it clear say there is already a apache runnin and stop the service or uninstall the apache May 30, 2015 at 15:24

9 Answers 9

41

I just encountered the exact same problem a few days ago and was having a hard time finding the fix, but I finally able to fix it.

Here's my fix:

  1. Win + R and type regedit then enter
  2. Open this directory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4
  3. Right-click on the "ImagePath" and choose "Modify"
  4. Change the Value Data field with your current installed path of apache in XAMPP
  5. In my case, the value is "D:\apps\xampp\apache\bin\httpd.exe" -k runservice
  6. For the question poster case, change the value to "C:\xampp\apache\bin\httpd.exe" -k runservice

I know it's an old post, but some people might still need this in the future. I hope it can help :)

UPDATE 12/7/2022:

This is due to our local machine already has Apache installed aside from XAMPP's Apache OR previously has installed XAMPP but in different folder directory. So my fix above is to change the Apache's target path to XAMPP's Apache path (In the folder where you installed xampp).

Another way to fix is to uninstall your existing Apache. You can find the folder directory from the error message that you got. the Found Path: C:\Apache\blablabla which could vary in every machine

21

I experienced the same problem. The solution that worked for me is :

  1. Run the XAMPP in the administrator mode. Go to the XAMPP control panel.

  2. In the modules section, in the 'Service' column, we are provided with checkboxes.'

  3. For the services that you are facing problems with, click on the corresponding checkbox to uninstall the service.

  4. Also, click on the same checkbox again to re-install the service.

I hope it works! Xampp control panel screenshot

3
  • If everything is normal, this should work. But if this control panel can't access the service, there is no way you can uninstall here. But if you can see the ticks, that should work.
    – AkiEru
    Jul 3, 2020 at 2:40
  • This right here worked for me!!! Thanks
    – jovialcore
    Oct 11, 2021 at 15:44
  • In some cases we have to restart the PC even after reinstalling the services (for new devs).
    – ARHAM RUMI
    Sep 15, 2022 at 5:28
11

Try

Control panel > Administrative Tools > Services, after get de services name, in my case:

Apache2.4
mysql

Run "CMD" as administrator and put this command:

C:/windows/system32> sc delete Apache2.4
C:/windows/system32> sc delete mysql

Close Xampp Panel and try again.

Greetings from Mexico.

1
7

I was also experiencing the same problem for some days. Finally, I got the solution. Follow the given steps, that worked perfectly for me:

  1. RUN the XAMPP Control Panel As Administrator
  2. Below the Service column, you will see checkboxes, click on the checkbox to install it (if not already installed marked as RED CROSS) and if it is already installed, then uninstall it first by clicking on the GREEN TICK. Make sure the service is STOPPED
  3. Then START the service again. That's all. Enjoy
  4. Still not working, close the XAMPP, RUN it again as Administrator
  5. Still not working, restart the PC (I have just experienced it)
3

Although Old Question but common problem for the new developers. Solution for my case:

Run "CMD" as administrator and put this command:

C:/windows/system32> sc delete Apache2.4

restart the Xampp

1

It means you have Apache installed and running service from the location C:\Apache\bin\httpd.exe

You need to stop the service and start xampp

5
  • How to stop the service?
    – SLobodan
    May 31, 2015 at 14:57
  • You can got to service management console windows-commandline.com/run-command-for-services-management and search Apache Service running and stop. Jun 1, 2015 at 2:45
  • Ok I found Run command , but i couldn't find the path, i think it is cause i deleted all apache files before you answered me before. Simply Apache not found. There is no other explanation about it. So it is still running, is there other way to stop it.
    – SLobodan
    Jun 2, 2015 at 18:33
  • Did you execute the setup_xampp.bat script? or even removing C:\Apache\bin\httpd.exe from the ENV Path Jun 3, 2015 at 3:04
  • First I tried to install it one by one, (apache, Php, MySql), Apache worked, but Php didn't so i removed all, and then i installed xampp. I removed C:\Apache\bin\httpd.exe before the Installation of xampp.bat.
    – SLobodan
    Jun 3, 2015 at 15:39
0

If you planing to work with XAMPP environment more comfortable way is:

  • Uninstall Apache (at C:\Apache\bin\httpd.exe)
  • Check Apache process at C:\Apache\bin\httpd.exe if it in memory - kill it.
1
  • Further note: to uninstall Apache, once in the directory (C:\Apache\bin), open a cmd prompt (with admin privilege) and execute "httpd -k uninstall".
    – Halogen
    Oct 7, 2016 at 21:43
0

Change your port in the httpd.conf file, this might solve the problem because you might have a Node.JS server or Skype or another application running at port 80.

0

I will assume that you have uninstalled and reinstalled XAMMP multiple times, due to the fact that Apache has started the service with the wrong path. The key is to delete the service and restart XAMMP control panel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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