简体   繁体   English

XAMPP Apache Service检测到路径错误

[英]XAMPP Apache Service detected with wrong path

I read a lot of problems about this, but I couldn't find the solution. 我读到了很多与此有关的问题,但是找不到解决方案。 Like a month ago, I installed a program that is called WAMP just to try it out. 像一个月前一样,我安装了一个名为WAMP的程序来进行试用。 When I uninstalled it and tried to install Apache , it said that the path is wrong. 当我卸载它并尝试安装Apache时,它表示路径错误。 I tried everything, and sorry if the answer of my question is too simple, but I can't fix the problem alone. 我已尝试了所有方法,但很抱歉,如果我的问题的答案过于简单,则无法独自解决问题。 Here is what XAMPP outputs in the console: 这是XAMPP在控制台中输出的内容:

Apache Service detected with wrong path
Change XAMPP Apache and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: "D:\programs\xampp 2016\apache\bin\httpd.exe" -k runservice
Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice

Just click on Start Menu -> Run and enter “Regedit” (sans quotes). 只需单击开始菜单->运行,然后输入“ Regedit”(无引号)。 Then you need to navigate to HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services[Name of Service]. 然后,您需要导航到HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services [服务名称]。 To change the location of the exe just change the ImagePath key. 要更改exe的位置,只需更改ImagePath键。

try the below steps.... 请尝试以下步骤...。

open cmd > run as administrator type the following commands 打开cmd>以管理员身份运行,键入以下命令

httpd -k shutdown
httpd -k stop
httpd -k uninstall

or open powershell> run as administrator type the following commands 或打开powershell>以管理员身份运行,键入以下命令

.\httpd -k shutdown
.\httpd -k stop
.\httpd -k uninstall

or 要么

win + R
type services.msc
then find Apache24 or httpd
now open cmd > run as administrator
type sc delete "<your services name from the list for apache>"

thanks to the sources and contributors :) 感谢消息来源和贡献者:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM