Wordpress 博客 :: 500 内部服务器错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/500105/
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
Wordpress Blog :: 500 Internal Server Error
提问by Daksh
I am getting this error message while trying to access a wordpress blog which is installed in a directory. Is this due to .htaccess or something? Any help is appreciated.
我在尝试访问安装在目录中的 wordpress 博客时收到此错误消息。这是由于 .htaccess 还是什么原因?任何帮助表示赞赏。
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
服务器遇到内部错误或配置错误,无法完成您的请求。
请联系服务器管理员 [email protected] 并告知他们发生错误的时间,以及您可能执行的任何可能导致错误的操作。
服务器错误日志中可能提供有关此错误的更多信息。
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。
Apache Server at xxxx.com Port 80'
Apache 服务器在 xxxx.com 端口 80'
回答by ieure
This is almost always a problem with your Apache configuration. Errors originating in PHP won't trigger the Apache 5xx handler, which is what you're seeing.
这几乎总是与您的 Apache 配置有关的问题。源自 PHP 的错误不会触发 Apache 5xx 处理程序,这就是您所看到的。
Unfortunately, without more information, your problem is impossible to diagnose. I'd recommend that you:
不幸的是,如果没有更多信息,就无法诊断您的问题。我建议你:
- Check the logs.First thing! It should give you a better idea where your problem is.
- Stop and restart Apache. If there is a problem with permissions on something Apache needs write access to (logs), it could completely fail to start. This should give you the proper motivation to fix the problem, particularly if there are other VirtualHosts on that Apache.
- Move your
.htaccess
file(s) somewhere else. If Apache works, you know it's a problem with that file.
- 检查日志。第一件事!它应该让您更好地了解问题出在哪里。
- 停止并重新启动 Apache。如果 Apache 需要对(日志)进行写访问的某些内容的权限存在问题,则它可能完全无法启动。这应该会给您解决问题的适当动机,特别是如果该 Apache 上还有其他 VirtualHosts。
- 将您的
.htaccess
文件移到其他地方。如果 Apache 工作正常,您就知道该文件有问题。
回答by Mark Biek
It sounds like you're getting some sort of PHP error but PHP isn't set to display errors. You'll want to check your Apache logs for detailed error info.
听起来您遇到了某种 PHP 错误,但 PHP 未设置为显示错误。您需要检查 Apache 日志以获取详细的错误信息。
The mostly likely culprit is that you're missing some prerequisite for running WordPress, although all you should really need is Apache, MySQL, & mod_rewrite.
最有可能的罪魁祸首是您缺少运行 WordPress 的一些先决条件,尽管您真正需要的只是 Apache、MySQL 和 mod_rewrite。
回答by Russ Pond
I was able to fix it by adding the following line to my .htaccess file:
我能够通过将以下行添加到我的 .htaccess 文件来修复它:
php_value memory_limit 128M
php_value memory_limit 128M
Russ
拉斯
回答by negrus
Look at http://zemalf.com/1470/wordpress-htaccess-the-definite-guide/, and look for the paragraph which says something like "Good and default .htaccess looks like this...."
查看http://zemalf.com/1470/wordpress-htaccess-the-define-guide/,并查找类似“好的和默认的 .htaccess 看起来像这样......”的段落。
回答by Stephen Baugh
Unfortunately it could be anything. Do static pages on the site work properly.
不幸的是,它可以是任何东西。网站上的静态页面是否正常工作。
Have you checked the server logs.
您是否检查过服务器日志。
I think it is likely to do with php. If static pages are there then possibly your config for wordpress is incorrectly configured or files missing.
我认为这很可能与php有关。如果存在静态页面,则可能是您的 wordpress 配置配置不正确或文件丢失。
Has php be working? Did the blog work and then stop? Did you get through the install process?
php 工作了吗?博客工作然后停止了吗?你完成安装过程了吗?
回答by Andrew
My issue was a little bit different. I had an .htaccess
file inside the wp-admin
directory. I deleted the .htaccess
inside of wp-admin
and that fixed my problems.
我的问题有点不同。我.htaccess
在wp-admin
目录中有一个文件。我删除了.htaccess
里面的内容wp-admin
并解决了我的问题。
回答by Sergio Felix
This is happening to me RIGHT NOW.
这正在发生在我身上。
As to from what I know, my hosting providers did a DNS change and so I'm waiting for the DNS to propagate, it's been like three hours and still zero.
据我所知,我的托管服务提供商进行了 DNS 更改,因此我正在等待 DNS 传播,已经过去了三个小时,但仍然为零。
Blog is showing ok, apache is up and working, I just can't get access into the WP Admin area.
博客显示正常,apache 已启动并正常工作,但我无法访问 WP 管理区域。
If it does get fixed by tomorrow, I'll reply here so it can be of help for others.
如果明天能解决的话,我会在这里回复,以便对其他人有所帮助。
Edit: I just fixed my problem.
编辑:我刚刚解决了我的问题。
In my case it was determined that the Fast Contact Form plug-in was creating the problem. I modified the folder name from si-contact-form to si-contact-form-hold then I regained WP Admin access.
就我而言,确定是 Fast Contact Form 插件造成了问题。我将文件夹名称从 si-contact-form 修改为 si-contact-form-hold 然后我重新获得了 WP Admin 访问权限。
After that I created a php.ini file with this string inside 'memory=64MB' and saved that into the wp-admin folder.
之后,我在“memory=64MB”中创建了一个带有此字符串的 php.ini 文件,并将其保存到 wp-admin 文件夹中。
Manually deleted the si-contact-form-hold (to avoid possible corrupted files) and reinstalled the Fast Contact Form.
手动删除 si-contact-form-hold(以避免可能损坏的文件)并重新安装快速联系表。
All my settings were already there and everything is back up and running good!
我的所有设置都已经存在,一切都已备份并运行良好!
Hope this helps.
希望这可以帮助。
回答by Digin Dominic
Check wordpress files ownership for the user are correct or not.
检查用户的 wordpress 文件所有权是否正确。
In linux ls -laZ
command will display the ownership.
在 linuxls -laZ
命令中将显示所有权。
For setting the ownership for a folder use this command
要设置文件夹的所有权,请使用此命令
chown -R username:username /user/username/public_html/
回答by pax
There can be multiple causes for this, I just solved mine, after 2-3 hours of going crazy. I had another WP instance in a subdirectory inside the main WP instance(in the root folder).
这可能有多种原因,我刚刚解决了我的问题,经过 2-3 个小时的疯狂。我在主 WP 实例(在根文件夹中)内的子目录中有另一个 WP 实例。
- Have checked / deleted .htaccess
- deleted plugin folder
- 已检查/删除 .htaccess
- 删除了插件文件夹
In the end, it was to do with the permission of the subfolder in which second instance was running. It was originally 775(write permission for group), I had to change it to 755(no write permission for group) and this finally fixed it, like magic.
最后,这与运行第二个实例的子文件夹的许可有关。它最初是775(组的写权限),我不得不将其更改为755(组的无写权限),这终于修复了它,就像魔术一样。
This is of course just one of possible the answers to your question, I wanted to write it down though as I didn't find it explicitly written anywhere so it might save others some time.
这当然只是您问题的可能答案之一,我想把它写下来,因为我没有发现它在任何地方明确写下来,所以它可能会为其他人节省一些时间。
回答by mkb
An HTTP 500 error could be caused by a great many things. Have you changed your .htaccess file recently? If you try to use a .htaccess feature that is disabled on your host, that is one possible cause.
HTTP 500 错误可能由很多原因引起。您最近是否更改了 .htaccess 文件?如果您尝试使用在您的主机上禁用的 .htaccess 功能,这是一个可能的原因。