博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
500 – 内部服务器错误_HTTP错误500 –用纯英语解释内部服务器错误
阅读量:2520 次
发布时间:2019-05-11

本文共 4193 字,大约阅读时间需要 13 分钟。

500 – 内部服务器错误

Error codes in the 4xx range mean you or your browser did something wrong. Maybe you weren't logged in, tried to access something you didn't have permission for, or simply got lost.

4xx范围内的错误代码表示您或您的浏览器做错了什么。 也许您没有登录,试图访问您没有权限的内容,或者只是迷路了。

However, error codes in the 5xx range means the error is out of your hands entirely (unless you are the server developer / administrator). Perhaps the second* most frustrating error code you can ever stumble across on the internet is the dreaded 500.

但是,错误代码在5xx范围内意味着该错误完全不受您控制(除非您是服务器开发人员/管理员)。 您可能在互联网上偶然发现的第二个最令人沮丧的错误代码是可怕的500。

这是什么意思? (What does it mean?)

Simply put, the server tried to do something and failed.

简单地说,服务器尝试执行某项操作,但失败了。

According to :

根据 :

The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
500(内部服务器错误)状态代码表示服务器遇到意外状况,阻止其满足请求。

The cause of this can be anything, really!

真正的原因可能是任何原因!

Let's imagine you are accessing a website using a Laravel PHP API for its back end.

假设您正在使用Laravel PHP API后端访问网站。

The thing throwing the 500 error could be something as simple as an errant error_log trying to log an array instead of a string – something completely unrelated to your request, but nonetheless an error that PHP would throw and kill the request you made to the server.

引发500错误的事情可能很简单,就像错误的error_log尝试记录数组而不是字符串一样-完全与您的请求无关,但仍然是PHP会抛出并杀死您对服务器的请求的错误。

Usually something as trivial as that would get caught before deployment (hopefully), but this just goes to show that, as the user of a website or app, the error is truly out of your hands.

通常,在部署之前(希望如此)会发现一些琐碎的事情,但这只是表明,作为网站或应用程序的用户,错误确实在您的掌控之中。

您如何解决? (How do you fix it?)

As a user without access to the server, you really only have option:

作为无法访问服务器的用户,您实际上只有以下选择:

通知网站所有者,否则您将返回500 (Notify the site owner that a 500 is being returned when you'd expect otherwise)

If you fully expect that you should be able to access the resource in question, but you are seeing this error, it is wise to let the team behind the site know.

如果您完全希望能够访问有问题的资源,但是看到此错误,则最好告知站点后面的团队。

Try to give the developers / support team as much information about what you were attempting to do so they can quickly replicate the issue to track down the bug.

尝试向开发人员/支持团队提供有关您正在尝试执行的操作的尽可能多的信息,以便他们可以快速复制问题以查找错误。

If you are feeling especially helpful, or curious, you may be able to hunt down more clues in the network tab of the developer tools for your browser.

如果您感到特别有帮助或好奇,则可以在浏览器开发人员工具的“网络”选项卡中找到更多线索。

On Firefox you can open the network tab with the shortcut keys ctrl + shift + E. On Chrome, you can open the developer tools with ctrl + shift + I and then select the network tab.

在Firefox上,您可以使用快捷键ctrl + shift + E打开网络选项卡。 在Chrome上,您可以使用ctrl + shift + I打开开发人员工具,然后选择“网络”标签。

With this tab open, attempt your request again and look for the 500 return code in the network output. Sometimes you might see a slightly more detailed server response describing the problem you faced. You can give that information to the developers to speed up the resolution to the problem.

在此选项卡打开的情况下,再次尝试您的请求,然后在网络输出中查找500返回码。 有时,您可能会看到稍微更详细的服务器响应,以描述所遇到的问题。 您可以将该信息提供给开发人员,以加快解决问题的速度。

If you are the developer, then you need to hunt down the bug and fix it! It could be anything, so I can't tell you how to do that. But if you are new to development, I would recommend first looking in the server logs for clues if it's not already obvious what the issue is.

如果您是开发人员,则需要找出错误并加以修复! 可能是任何东西,所以我不能告诉你如何做。 但是,如果您不熟悉开发,建议您先在服务器日志中查找线索,以了解问题的根源。

稳坐 (Sit tight)

Having reported the issue, you've done all you can reasonably do.

报告问题后,您已尽一切可能做。

* are you wondering what the most frustrating error code to come across in the wild is? . If you come across this as an actual error, it means the developer went to the effort of implementing this as the error response, but it's a joke and doesn't give you information. It happens.

*您是否想知道在野外遇到的最令人沮丧的错误代码是什么? 如果您将其视为实际错误,则表示开发人员已着手将其实现为错误响应,但这只是个玩笑,并没有为您提供信息。 它发生了。

If you promise to never return a 418 in response to a real client side error, then you are welcome to keep in touch with me on Twitter .

如果您承诺永远不会返回418来响应真正的客户端错误,那么欢迎您通过Twitter 与我保持联系。

翻译自:

500 – 内部服务器错误

转载地址:http://imgwd.baihongyu.com/

你可能感兴趣的文章
Oracle的安装
查看>>
Android Socket连接PC出错问题及解决
查看>>
Android Studio-—使用OpenCV的配置方法和demo以及开发过程中遇到的问题解决
查看>>
第2天线性表链式存储
查看>>
python自动化测试-D11-学习笔记之一(yaml文件,ddt)
查看>>
mysql存储过程使用游标循环插入数据
查看>>
Ubuntu 12.04 添加新用户并启用root登录
查看>>
20145309信息安全系统设计基础第9周学习总结上
查看>>
c# 字段、属性get set
查看>>
td内容超出隐藏
查看>>
Spring CommonsMultipartResolver 上传文件
查看>>
Settings app简单学习记录
查看>>
SQLAlchemy
查看>>
多线程
查看>>
使用缓存的9大误区(下)转载
查看>>
appium键值对的应用
查看>>
MyEclipse 8.X 通用算法
查看>>
selenium.Phantomjs设置浏览器请求头
查看>>
分布式数据库如何选择,几种分布式数据库优缺点一览
查看>>
BZOJ 4443: 小凸玩矩阵【二分图】
查看>>