Php 无法在xamp服务器中启动Apache模块
我最近第一次安装了xamp服务器,希望在本地服务器上运行一个php网站。当我在xamp服务器中启动Apache模块时,它会显示以下错误,但MySQL启动并运行良好:Php 无法在xamp服务器中启动Apache模块,php,mysql,apache,xampp,Php,Mysql,Apache,Xampp,我最近第一次安装了xamp服务器,希望在本地服务器上运行一个php网站。当我在xamp服务器中启动Apache模块时,它会显示以下错误,但MySQL启动并运行良好: 9:04:58 PM [Apache] Attempting to start Apache app... 9:04:58 PM [Apache] Status change detected: running 9:04:58 PM [Apache] Status change detected: stopp
9:04:58 PM [Apache] Attempting to start Apache app...
9:04:58 PM [Apache] Status change detected: running
9:04:58 PM [Apache] Status change detected: stopped
9:04:58 PM [Apache] Error: Apache shutdown unexpectedly.
9:04:58 PM [Apache] This may be due to a blocked port, missing dependencies,
9:04:58 PM [Apache] improper privileges, a crash, or a shutdown by another method.
9:04:58 PM [Apache] Press the Logs button to view error logs and check
9:04:58 PM [Apache] the Windows Event Viewer for more clues
9:04:58 PM [Apache] If you need more help, copy and post this
9:04:58 PM [Apache] entire log window on the forums
我这样做是为了我的软件测试任务。我必须在本地服务器上测试一个网站,为此我安装了xamp服务器。有人能帮忙吗?对此可能有很多答案。最常见的是在端口80上运行的另一个程序。我有同样的问题,然后我发现我的流浪者箱运行在端口80上 如果您的计算机上安装了skype,请将apache的端口更改为其他端口 为此,请转到xampp/apache/conf/httpd.conf并更改httpd.conf中的以下行:
ServerName localhost:80
到
此外,如果不起作用,还可以更改以下行:
Listen 80
to
Listen 81
有时,此错误是由于计算机上的其他软件使用相同的端口而发生的,因此您必须更改端口号或从其他软件(如virtual box等)禁用相同的端口号。在某些情况下,某些端口被网络管理员或ISP阻止,尽管,我不建议将Xampp作为可公开访问的服务器运行 端口80被其他一些应用程序使用,如Skype等。。当您想同时访问Apache和这些应用程序时,可能会发生一些冲突。您可以选择更改Apache服务器的端口号 如果您的Apache服务器不工作,则表明其他一些应用程序正在使用端口80 让我们手工做吧。 步骤1:对于这个过程,首先打开位于xampp\apache\conf的httpd.conf文件\ 在我的系统中,我的xampp安装在c驱动器中,因此我的路径是c:\xampp\apache\conf 您的可能与此不同 现在使用文本编辑器或程序员编辑器打开httpd.conf文件,我正在使用记事本++ 现在找到显示Listen 80的行。这是第47行,或者按contol+f并键入80,然后它会自动将courser移动到此处,然后将80更改为您自己的端口,我使用的是3388。 然后按control+s保存文件。
成功保存并重新启动Apache服务器后,您的端口号已成功更改我已打开您所说的文件。你能告诉我你提到的线路在哪里吗。正如我检查过的,没有文件说明serverName localhost:something您使用的是什么操作系统?使用windows 8.1打开XAMPP文件夹,转到/etc/httpd.conf。然后打开那个文件,更改我之前告诉过你的行。看起来他们的界面有点改变了。让我知道它是否修复了您是否按了日志按钮?日志文件上写的是什么?嗨,欢迎来到stackoverflow。请提供一个最小的、完整的、可复制的代码示例。没有代码,任何人都做不了什么。
Listen 80
to
Listen 81