WordPress 博客 :: 500 内部服务器错误
我在尝试访问安装在目录中的 WordPress 博客时收到此错误消息。 这是由于 .htaccess 还是其他原因造成的? 任何帮助表示赞赏。
服务器遇到内部错误或配置错误,无法完成您的请求。
请联系服务器管理员[电子邮件受保护]并通知他们错误发生的时间,以及您可能执行的任何操作可能导致错误。
服务器错误日志中可能提供有关此错误的更多信息。
此外,尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。
Apache 服务器位于 xxxx.com 端口 80'
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.
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.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at xxxx.com Port 80'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
这几乎总是您的 Apache 配置的问题。 源自 PHP 的错误不会触发 Apache 5xx 处理程序,这就是您所看到的。
不幸的是,如果没有更多信息,您的问题就无法诊断。 我建议您:
.htaccess
文件移至其他位置。 如果 Apache 可以工作,您就知道该文件有问题。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.
Unfortunately, without more information, your problem is impossible to diagnose. I’d recommend that you:
.htaccess
file(s) somewhere else. If Apache works, you know it’s a problem with that file.听起来您遇到了某种 PHP 错误,但 PHP 未设置为显示错误。 您需要检查 Apache 日志以获取详细的错误信息。
最有可能的罪魁祸首是你缺少运行 WordPress 的一些先决条件,尽管你真正需要的是 Apache、MySQL 和 WordPress。 mod_rewrite。
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.
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.
我可以通过将以下行添加到我的 .htaccess 文件来修复它:
拉斯
I was able to fix it by adding the following line to my .htaccess file:
Russ
这件事现在就发生在我身上。
据我所知,我的托管提供商更改了 DNS,所以我正在等待 DNS 传播,大约三个小时了,但仍然为零。
博客显示正常,apache 已启动并正在工作,我只是无法访问 WP 管理区域。
如果明天解决了,我会在这里回复,以便对其他人有所帮助。
编辑:我刚刚解决了我的问题。
就我而言,确定是快速联系表单插件造成了问题。 我将文件夹名称从 si-contact-form 修改为 si-contact-form-hold,然后重新获得了 WP 管理员访问权限。
之后,我创建了一个 php.ini 文件,其中包含“内存 = 64MB”内的字符串,并将其保存到 wp-admin 文件夹中。
手动删除 si-contact-form-hold(以避免可能损坏的文件)并重新安装快速联系表。
我的所有设置都已经在那里,一切都已恢复并运行良好!
希望这可以帮助。
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.
Blog is showing ok, apache is up and working, I just can't get access into the WP Admin area.
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.
After that I created a php.ini file with this string inside 'memory=64MB' and saved that into the wp-admin folder.
Manually deleted the si-contact-form-hold (to avoid possible corrupted files) and reinstalled the Fast Contact Form.
All my settings were already there and everything is back up and running good!
Hope this helps.
看看 http://zemalf.com/1470/wordpress-htaccess-the- Define-guide/,并查找类似“良好且默认的 .htaccess 看起来像这样......”的段落
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...."
我的问题有点不同。 我在
wp-admin
目录中有一个.htaccess
文件。 我删除了wp-admin
内的.htaccess
并解决了我的问题。My issue was a little bit different. I had an
.htaccess
file inside thewp-admin
directory. I deleted the.htaccess
inside ofwp-admin
and that fixed my problems.不幸的是,它可能是任何东西。 网站上的静态页面是否正常工作。
你检查过服务器日志吗?
我认为这可能与 php 有关。 如果存在静态页面,那么您的 WordPress 配置可能不正确或文件丢失。
php 运行了吗? 博客是否正常运行然后就停止了? 您完成安装过程了吗?
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.
Has php be working? Did the blog work and then stop? Did you get through the install process?
检查用户的 WordPress 文件所有权是否正确。
在linux中
ls -laZ
命令将显示所有权。要设置文件夹的所有权,请使用此命令
Check wordpress files ownership for the user are correct or not.
In linux
ls -laZ
command will display the ownership.For setting the ownership for a folder use this command
HTTP 500 错误可能由多种原因引起。 您最近更改过 .htaccess 文件吗? 如果您尝试使用主机上禁用的 .htaccess 功能,这就是可能的原因之一。
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.
多点
日志更新
在日志中获取这两个错误:
如何在 cpanel 上重新启动 apache?
Some more points
Update on logs
Getting these two errors in the logs:
How do I restart apache on cpanel ?
上传到 wp-admin 文件夹的 php.ini 文件中的上述行解决了我的问题。 我无法通过 /wp-admin 或 /wp-login.php 登录仪表板,并且收到 HTTP 服务器错误 500。
The above line inside a php.ini file uploaded to the wp-admin folder solved my problem. I was not being able to log into the dashboard either through /wp-admin or /wp-login.php, and was getting a HTTP server error 500.
造成这种情况的原因可能有多种,我刚刚解决了我的问题,经过 2-3 个小时的疯狂处理。
我在主 WP 实例内的子目录(根文件夹中)中有另一个 WP 实例。
最后,这与第二个实例运行的子文件夹的权限有关。 它最初是775(组的写权限),我不得不将其更改为755(组没有写权限),这最终像魔术一样修复了它。
这当然只是您问题的可能答案之一,我想把它写下来,因为我没有发现它在任何地方明确写过,所以它可能会节省其他人一些时间。
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).
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.
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.