Apache 未启动如何解决此错误;Localhost 数据库不工作

Apache is not starting how to resolve this error;Localhost database is not working

我退出了 skype 我虽然是同一个端口但仍然无法正常工作.. 我尝试重新启动我的电脑并重新启动 Xamppp。但不工作。

   8:47:28 PM  [Apache]  Attempting to start Apache app...
    8:47:28 PM  [Apache]  Status change detected: running
    8:47:28 PM  [Apache]  Status change detected: stopped
    8:47:28 PM  [Apache]  Error: Apache shutdown unexpectedly.
    8:47:28 PM  [Apache]  This may be due to a blocked port, missing dependencies, 
    8:47:28 PM  [Apache]  improper privileges, a crash, or a shutdown by another method.
    8:47:28 PM  [Apache]  Press the Logs button to view error logs and check
    8:47:28 PM  [Apache]  the Windows Event Viewer for more clues
    8:47:28 PM  [Apache]  If you need more help, copy and post this
    8:47:28 PM  [Apache]  entire log window on the forums
    8:47:30 PM  [Apache]  Problem detected!
    8:47:30 PM  [Apache]  Port 80 in use by "Unable to open process" with PID 4!
    8:47:30 PM  [Apache]  Apache WILL NOT start without the configured ports free!
    8:47:30 PM  [Apache]  You need to uninstall/disable/reconfienter code heregure the blocking application
    8:47:30 PM  [Apache]  or reconfigure Apache and the Control Panel to listen on a different port
    

我正在使用 xampp 我在启动时遇到错误 xampp 如何解决此错误。

解决方案:

在您的 XAMPP 控制面板上,停止 Apache 模块,单击配置按钮,然后单击 select Apache (httpd.conf)。在文件中查找 (Ctrl+F) 80。将所有 80 替换为您喜欢的随机值(8080 看起来不错)并保存文件。现在点击 Config 按钮,然后点击 select Apache (httpd-ssl.conf)。在文件上查找 (Ctrl+F) 443。将所有 443 替换为您喜欢的随机值(4433 看起来不错)并保存文件。再次启动 Apache 模块。 现在 APACHE 必须正常工作 :)

注意:

如果您想知道此错误的确切原因,请打开您的任务管理器并转到“详细信息”选项卡。找到 XAMPP 错误日志中提到的具有 PID 的进程。这里到底发生了什么是您的端口正忙于另一个由 PID(进程 ID)指示的进程。所以在解决方案中,我们所做的就是,为APACHE分配另一个端口。

额外提示:

当您在浏览器的地址栏中键入 localhost 时,它默认使用端口 80。但是由于您更改了 Apache 模块的默认端口,请确保相应地调整本地主机的地址。例如,如果您将端口 80 更改为端口 8080,您将不得不在浏览器上始终使用 http://localhost:8080/,这样您的浏览器就会知道 Apache 现在正在使用端口 8080,而不是默认端口。

看到它并不难 :) 在您的主题中,您说“..database is not working”,但是 MySQL 上没有提及错误日志。如果你的 MySQL 模块也有同样的错误,你必须像上面那样做一个简单的端口配置。如果你卡住了,你可以从我的博客文章中找到步骤:http://ashenlive.blogspot.com/2016/08/web-programming-with-php.html