php 本地主机 http 500 内部服务器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9087291/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 06:07:28  来源:igfitidea点击:

localhost http 500 internal server error

phpmysqllocalhost

提问by user893970

Sometimes, the localhost that i am using gave me that "http 500 error" whenever i try to access it. But, restarting the computer solved that problem and I could access my files, until today. Today, even though i have changed nothing with my codes(same as yesterday), I cannot access my localhost and phpmyadmin even if i restart the pc. How can i solve it? what went wrong? I dont think that the problem is about my code structure because if it was I could not access localhost yesterday(I changed nothing)

有时,每当我尝试访问它时,我使用的本地主机都会给我“http 500 错误”。但是,重新启动计算机解决了这个问题,我可以访问我的文件,直到今天。今天,即使我的代码没有改变(与昨天相同),即使我重新启动电脑,我也无法访问我的本地主机和 phpmyadmin。我该如何解决?什么地方出了错?我不认为问题出在我的代码结构上,因为如果是这样的话,我昨天无法访问 localhost(我什么都没做)

回答by Halcyon

Check the error log, it should have a more detailed description of the error. If you're using Apache look for a file named error.logprobably in a folder called log

检查错误日志,它应该有更详细的错误描述。如果您使用的是 Apache,请在名为error.log的文件夹中查找可能名为的文件log

回答by ankit suthar

Actually I am also Have the same issue with the localhost so I eneble the rewrite mode of my wamp server and solve this issue.

实际上,我对 localhost 也有同样的问题,所以我启用了 wamp 服务器的重写模式并解决了这个问题。

For Localhost :

对于本地主机:

Apache -> Apache Modules -> rewrite module

Apache -> Apache 模块 -> 重写模块

Enable it and restart the services.

启用它并重新启动服务。