php 首次安装后 XAMPP Apache 和 MySQL 服务未启动或停止
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10259737/
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
XAMPP Apache and MySQL services not starting or stopping after first installation
提问by user1146440
Hi I want to start learning PHP and MySql and also polish my knowledge of Javascript witch is very limited at the moment having only use jQuery and knowing only the core sintax of the language.I choose to read Learning PHP MySQL and Javascriptwitch seemed to fit all my needs.
嗨,我想开始学习 PHP 和 MySql 并提高我对 Javascript 女巫的了解,目前我只使用 jQuery 并且只知道语言的核心语法。我选择阅读学习 PHP MySQL 和 Javascript女巫似乎适合我所有的需要。
Having always had bad luck when installing something new I immediately hit a dead end with XAMPP 1.7.7.
在安装新东西时总是运气不好,我立即用 XAMPP 1.7.7 陷入了死胡同。
The server runs corectly when is first installed and I can stop MySQL and Apache from running from the control panel.But if close the control panel and reopen it I get and error.
服务器在第一次安装时正确运行,我可以从控制面板中停止 MySQL 和 Apache 的运行。但是如果关闭控制面板并重新打开它,我会出错。
If when it was first opened I left apache and Mysql opened I get the error Apache Service not stopped [-1] the same goes for MySQL.If the services were close I get the same error that says apache service can't start same for MySQL.
如果第一次打开时我离开了 apache 并打开了 Mysql 我得到错误 Apache 服务没有停止 [-1] MySQL 也是如此。如果服务关闭我得到同样的错误说 apache 服务不能启动相同MySQL。
I have tryed multiple instalations and the same thing happens.
我已经尝试了多次安装并且发生了同样的事情。
I first tought I will install it and live them open so I can start working but sadly it didn't work corectly or I don't know how to run a PHP script corectly.
我首先想到我会安装它并将它们打开,这样我就可以开始工作了,但遗憾的是它不能正常工作,或者我不知道如何正确运行 PHP 脚本。
Here's what I did:
这是我所做的:
I opened PHPStorm and pasted this little scripped with a PHP extension :
我打开 PHPStorm 并粘贴了这个带有 PHP 扩展名的小文件:
<?php
echo "Hello world";
?>
After that I tried to run it but I get the error "PHP interpretor is not installed". Shouldn't it have worked if the apache server was running?
之后,我尝试运行它,但出现错误“未安装 PHP 解释器”。如果 apache 服务器正在运行,它不应该工作吗?
回答by Taha Paksu
You should wait after you stopped apache or mysql to let them clean things up. If you want to force them to end their processes, you can kill httpd.exeand mysqld.exefrom task manager and then try starting it from xampp control panel.
您应该在停止 apache 或 mysql 后等待让他们清理。如果你想强迫他们结束他们的进程,你可以从任务管理器中杀死httpd.exe和mysqld.exe,然后尝试从 xampp 控制面板启动它。
回答by brezanac
Could it be that you are running Skype on the same machine? Its a known issue where Skype takes control over port 80 in order to become a supernode in the Skype network.
可能是您在同一台机器上运行 Skype?这是 Skype 控制端口 80 以成为 Skype 网络中的超级节点的一个已知问题。
Go to Skype and in the "Tools"menu locate subsection "Advanced", option "Connection". There you'll find an option saying "Use port 80 and 443 as alternatives for incoming connections". Uncheck it, click "Save"and try restarting your server.
转到 Skype 并在"Tools"菜单中找到小节"Advanced"选项"Connection"。在那里你会发现一个选项说"Use port 80 and 443 as alternatives for incoming connections"。取消选中它,单击"Save"并尝试重新启动服务器。
回答by codemania
What OS are you using? Are you using the XAMPP control panel?
你使用的是什么操作系统?您在使用 XAMPP 控制面板吗?
In windows press
在 windows 中按
Start
Run
Type "Services.msc"
Find the "Apache" service
Right click and stop
I find i get this error if i start the apache service without the control panel but try to stop it with the control panel.
我发现如果我在没有控制面板的情况下启动 apache 服务但尝试使用控制面板停止它,我会收到此错误。

