【问题标题】:XAMPP Apache server has wrong pathXAMPP Apache 服务器路径错误
【发布时间】:2016-04-29 16:50:21
【问题描述】:

当我启动 XAMPP 并尝试启动 mySQL 和 Apache 时,我都收到了类似的错误:

12:07:22 PM  [Apache]   Apache Service detected with wrong path
12:07:22 PM  [Apache]   Change XAMPP Apache and Control Panel settings or
12:07:22 PM  [Apache]   Uninstall/disable the other service manually first
12:07:22 PM  [Apache]   Found Path: "C:\Apache24\bin\httpd.exe" -k runservice
12:07:22 PM  [Apache]   Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice

我已经到处搜索可能会改变路径的程序,但我已经卸载了我在使用完整的、真正的 LAMP 堆栈时拥有的所有 Apache 东西。我尝试卸载并重新安装 XAMPP,但没有任何效果。

错误读数显示要更改 XAMPP 控制面板中的设置,但我找不到更改路径的位置。

【问题讨论】:

    标签: apache path xampp


    【解决方案1】:

    我能解决这个问题!!!

    遇到了与上述相同的问题,确保没有任何东西在使用端口 80 并且仍然无法正常工作,并收到消息说 Apache 和 Mysql 被检测到错误的路径。

    我之前确实安装过一次 XAMPP,然后卸载并重新安装。我什至手动卸载了,但仍然有问题。

    修复。一定要先备份你的系统!!!

    Start Services via Control Panel>Admin Tools (also with Ctrl+R and services.msc)
    
    Look for Apache and mySQL services. Look at the patch indicated in the description (right click on service then click on properties). Chances are that you have Apache listed twice, one from your correct install and one from a previous install. Even if you only see one, look at the path, chances are its from a previous install and causing your install not to work. In either case, you need to delete those incorrect services.
    
    a. Got to command prompt (run as administrator): Start > all programs > Accessories > right click on Command Prompt > Select 'run as administrator'
    
    b. on command prompt type sc delete service, where service is the service you're wanting to delete, such as apache2.1 (or sc delete Apache2.4). It should be exactly as it appears in your services. If the service has spaces such as apache 2.1 then enter it in quotes, i.e. sc delete "apache 2.1"
    
    c. press enter. Now refresh or close/open your services window and you'll see its gone.
    

    对 XAMPP 发现以错误路径运行的所有服务执行此操作。

    一旦你这样做了,去重新启动XAMPP控制面板(作为管理员)和viola!!!一切正常。没有冲突

    【讨论】:

      【解决方案2】:

      我找到了解决方案。这可能并非在所有情况下都有效。

      1. 我进入 Config(在 XAMPP 控制面板上)并将 Apache 和 MySQL 配置为在启动 XAMPP 控制面板时自动运行,然后重新启动控制面板。
      2. 在窗口左侧的“服务”下,我单击了 Apache 旁边的复选标记。系统提示我确认我要卸载该服务。我说是的,然后它就卸载了
      3. 然后我单击了 Apache 旁边的红色 x 并对提示说“是”。它重新安装,现在可以正常工作了。

      【讨论】:

        【解决方案3】:

        遇到与上述相同的问题。 您可能已经注意到 Apache 左侧的绿色勾号。 首先,您需要通过单击卸载该服务。 然后压制相同的图标并安装服务。 它应该可以正常工作。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2016-11-03
          • 2015-03-13
          • 2013-01-09
          • 2018-06-20
          • 2014-09-28
          • 2015-08-13
          • 2017-05-25
          • 2020-09-27
          相关资源
          最近更新 更多