php 检测到路径错误的 Apache 服务

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30547759/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 21:52:20  来源:igfitidea点击:

Apache Service detected with wrong path

phpapachexampp

提问by SLobodan

Hej, I have problem with:

Hej,我有以下问题:

Apache Service detected with wrong path

检测到路径错误的 Apache 服务

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

下午 4:31:33 [Apache] 更改 XAMPP Apache 和控制面板设置或
下午 4:31:33 [Apache] 首先手动卸载/禁用其他服务
下午 4:31:33 [Apache] 找到路径:“C:\ Apache\bin\httpd.exe”-k runservice
4:31:33 PM [Apache] 预期路径:“c:\xampp\apache\bin\httpd.exe”-k runservice

How to fix it? In advance, thank you.

如何解决?提前谢谢你。

回答by Rio Hilmy

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
  1. Win + R 输入 regedit 然后回车
  2. 打开这个目录 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4
  3. 右键单击“ImagePath”并选择“修改”
  4. 使用 XAMPP 中当前安装的 apache 路径更改值数据字段
  5. 在我的情况下,该值为“D:\apps\xampp\apache\bin\httpd.exe” -k runservice
  6. 对于问题海报案例,将值更改为 "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 :)

我知道这是一个旧帖子,但有些人将来可能仍然需要这个。我希望它可以帮助:)

回答by Parul Sinha

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.

  1. 在管理员模式下运行 XAMPP。转到 XAMPP 控制面板。

  2. 在模块部分的“服务”列中,我们提供了复选框。

  3. 对于您遇到问题的服务,单击相应的复选框以卸载该服务。

  4. 此外,再次单击相同的复选框以重新安装该服务。

I hope it works! Xampp control panel screenshot

我希望它有效! Xampp 控制面板截图

回答by Ransomware0

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.

控制面板 > 管理工具 > 服务,在获取服务名称后,在我的情况下:

Apache2.4
mysql

以管理员身份运行“CMD”并输入以下命令:

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

关闭 Xampp 面板并重试。

Greetings from Mexico.

来自墨西哥的问候。

回答by Dip Hasan

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

虽然是旧问题,但对于新开发人员来说是常见的问题。我的情况的解决方案:

Run "CMD" as administrator and put this command:

以管理员身份运行“CMD”并输入以下命令:

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

C:/windows/system32> sc 删除Apache2.4

restart the Xampp

重启 Xampp

回答by B L Praveen

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

这意味着您已经安装了 Apache 并从 C:\Apache\bin\httpd.exe 位置运行服务

You need to stop the service and start xampp

您需要停止服务并启动xampp

回答by mrLSD

If you planing to work with XAMPPenvironment more comfortable way is:

如果您打算使用XAMPP环境更舒适的方法是:

  • Uninstall Apache (at C:\Apache\bin\httpd.exe)
  • Check Apache process at C:\Apache\bin\httpd.exe if it in memory - kill it.
  • 卸载 Apache(位于 C:\Apache\bin\httpd.exe)
  • 检查位于 C:\Apache\bin\httpd.exe 的 Apache 进程是否在内存中 - 杀死它。

回答by Michael Abia

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

更改httpd.conf文件中的端口,这可能会解决问题,因为您可能有 Node.JS 服务器或 Skype 或在端口上运行的其他应用程序80

回答by Caine Kiewit

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

我假设您已经多次卸载并重新安装 XAMMP,因为 Apache 以错误的路径启动了该服务。关键是删除服务重启XAMMP控制面板