欢迎各位兄弟 发布技术文章
这里的技术是共享的
见下面红色的部分文字
Ctrl+R > regedit (打开注册表,找到 apache 服务,然后删掉即可,是因为自己多次安装,出现残留)
Then go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
其实下面的根本不需要再看了
I've been trying to install php, apache, and mySQL in a working fashion for some time now. After attempting manually several times and hitting roadblocks, I ended up just trying to use Xampp.
However, upon startup, the program says:
2:18:39 PM [main] Running with Administrator rights - good!
2:18:39 PM [main] XAMPP Installation Directory: "c:\xampp\"
2:18:39 PM [main] Checking for prerequisites
2:18:39 PM [main] All prerequisites found
2:18:39 PM [main] Initializing Modules
2:18:39 PM [Apache] Apache Service detected with wrong path
2:18:39 PM [Apache] Change XAMPP Apache and Control Panel settings or
2:18:39 PM [Apache] Uninstall/disable the other service manually first
2:18:39 PM [Apache] Found Path: "C:\Apache24\bin\httpd.exe" -k runservice
2:18:39 PM [Apache] Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
I followed the suggestions here, but
(a) Changing the port Listen 80
to Listen *:80
or Listen 81
had no effect.
(b) using netstat -ao
, there were no local addresses ending with 80.
I've also tried deleting any files related to apache, mysql, and php not in the xampp folder, which were left over from previous install attempts.
Tried xampp 1.8.2, uninstalled, tried 1.8.3, same issue.
For what I can guess, I must've changed some code somewhere outside Xampp before I installed it, and now it is executing when apache is run, changing the path from what Xampp wants (Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
) to a path to the now deleted folder C:\Apache24\bin
. However, I don"t know where this code might be!
I tried searching my whole C drive for C:\Apache24\bin, but the search came up empty.
Machine: Windows 7 64 bit
Previously installed/uninstalled: Apache2.2, Apache2.4, php5.5.4, MySQL using MySQL Installer 5.6
tried xampp for windows 1.8.2
xampp for windows 1.8.3 currently installed.
Any help?
The reason to get this error is because you had Apache installed once before and its service is still running.
If you are using windows 7, click on start and type "services". Open Services and see if Apache is listed. If yes, double click on it to see its properties. Copy the service name (e.g Apache 2.4) by selecting it -> right click -> selecting Copy.
Close the services window.
Click on start and find cmd
by typing it. Right click on cmd.exe and select "Run as administrator".
When the cmd window has opened type this command and press Enter:
note: instead of Apache 2.4 you should right click on the window to select paste
sc delete "Apache 2.4"
After pressing enter you should get the message: serviceDelete Success
Open services windows again (I explained it above) and see if you have Apache there again or not.
The above answer will probably provide you the solution, but in case it gives an error after you run the command:
sc delete "Apache 2.4"
the error:
The specified service does not exist as an Installed service.
You might want to change the "path to executable" for the Apache service manually. For that, open Registry Edit by using command prompt:
Ctrl+R > regedit
Then go to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
and find the service for which you want to change the default path and then locate the ImagePath
subkey and change it's value to the Expected Path
shown in XAMPP Control Panel.
Ctrl+R > regedit
Then go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
for me it worked by deleting the apache service,
uninstall the apache. restart the windows
then just reinstall it to the former location it has conflict with.
now it works fine.
This error is not related to the port.
Inside the two links I explained exactly how this issue can be solved.
https://github.com/MHolger77/Xampp-WrongPath https://www.linkedin.com/pulse/xampp-wrongpath-mohammad-hosein-shamsaei/
Apache
Apache Service detected with wrong path
Change XAMPP Apache and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: "somePath(wrongPath)" -k runservice
Expected Path: "anotherPath(correctPath)" -k runservice
Follow the steps below:
Press WinKey + R
Run regedit
go to "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\"
Find Apache file (example Apache2.4)
Open Apache file
Open ImagePath
Replace the correctPath with the wrongPath
我已经在Windows 7计算机上安装了XAMPP,但无法使Apache工作。
在启动时,出现以下错误:
13:09:21 [apache] Apache Service Detected With Wrong Path
13:09:21 [apache] Uninstall the service manually first
13:09:21 [apache] Possible problem detected!
13:09:21 [apache] Port 80 in use by "system"!
13:09:21 [tomcat] Tomcat Service Detected With Wrong Path
13:09:21 [tomcat] Uninstall the service manually first
在打开XAMPP面板并安装Apache服务之后:我尝试启动它,它总是卡在“正在启动apache服务...”中。
关于如何解决这个问题有什么建议吗?
谢谢贾米尔
我能够解决这个问题!
遇到与上述相同的问题,请确保没有任何东西在使用端口80,并且仍然无法正常工作,并得到消息,指出使用错误的路径检测到Apache和Mysql。
我确实曾经安装过XAMPP,然后将其卸载并重新安装。我什至手动卸载,但仍然有问题。
解决。确保先备份系统!
通过“控制面板”>“管理工具”(也带有Ctrl+R和services.msc
)启动服务
寻找Apache和MySQL服务。查看描述中指示的补丁(右键单击服务,然后单击属性)。可能您列出了两次Apache,一次来自正确的安装,一次来自先前的安装。即使您只看到一个,也请查看路径,很可能是以前的安装导致您的安装无法进行。无论哪种情况,都需要删除这些不正确的服务。
一种。转到命令提示符(以管理员身份运行):开始>所有程序>附件>右键单击命令提示符>选择“以管理员身份运行”
b。在命令提示符下键入sc delete service
,其中service是要删除的服务,例如apache2.1(或sc delete Apache2.4
)。它应该与您的服务中显示的完全一样。如果服务中有空格,例如Apache 2.1,则将其输入引号,即sc删除“ Apache 2.1”
C。按回车。现在刷新或关闭/打开您的服务窗口,您会发现它已经消失了。
对于XAMPP发现以错误路径运行的所有服务,请执行此操作。
完成此操作后,继续并重新启动XAMPP控制面板(以管理员身份),瞧!所有作品。没有冲突
我的朋友,这将解决您的问题;)
在文件夹(xampp)的根目录中,只需运行此文件(setup_xampp.bat),然后按Enter
并尝试启动apache服务器
每件事都会像魅力一样起作用;)
我花了3个多小时来找出解决方案。实际上,“系统”服务正在使用端口80,因此我尝试将“ httpd”文件中的端口从80更改为8080,但同样出现了“系统使用端口80”的问题。它使我发狂了3个小时,因为每件事都发生了变化,例如端口,本地主机服务器等都指向8080。
最后,我发现了服务器根错误。基本上,“ httpd”中的“服务器根目录”应指向xampp的apache foler。就我而言,那是
ServerRoot "xampp/apache"
我只是将其更改如下:
ServerRoot "C:/xampp/apache"
它已经成功运行,现在一切都以OK状态运行。
对我来说,问题是我安装了两个Apache Tomcat
以下步骤解决了我的问题:
在命令提示符下打开services.msc
选择Apache Tomcat服务,右键单击并选择属性
检查服务可执行文件的路径
请按照https://stackoverflow.com/questions/7190480/modifying-the-path-to-executable-of-a-windows-service中的说明 将路径更改为“ \ tomcat \ bin \ tomcat7.exe” // RS // Tomcat7
重新启动XAMPP控制面板
我的Apache服务与MySQL的启动不同。如果以上提示均无效,请按照以下步骤操作:
在任何可用的窗口上打开regedit.exe。以管理员身份运行。(仅在Windows 7和更高版本上)
转到本地机器/系统/ controlset001 /服务
查找和删除服务apache和mysql的文件夹。
卸载xampp。删除xampp的文件夹。
重新启动计算机,然后重新安装Xampp。之后,您的Xampp Apache和Mysql应该可以工作了。
Note: Ports 80 and 443 must be unused by any program.
If it is in use . Just edit ports. There is a lot of tutorials about that .
感谢您对这个问题的关注。因为它吸引了必须删除的低质量或垃圾邮件答案,所以现在发布答案需要在该站点上拥有10个声誉(关联奖励不计入)。
您是否要回答这些未解决的问题之一?
来自 https://stackoverflow.com/questions/11794829/xampp-on-windows-apache-not-starting