CakePHP 500 内部服务器错误 [英] CakePHP 500 Internal Server Error

查看:28
本文介绍了CakePHP 500 内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误

内部服务器错误

服务器遇到内部错误或配置错误无法完成您的请求.

The server encountered an internal error or misconfiguration and was unable to complete your request.

请联系服务器管理员,webmaster@strivemedicare.in并通知他们错误发生的时间,以及您可能会做的任何事情已经做了可能导致错误的事情.

Please contact the server administrator, webmaster@strivemedicare.in 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.

此外,还遇到了 500 Internal Server Error 错误尝试使用 ErrorDocument 来处理请求.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

We use DreamHost and the link to the URL is http://strivemedicare.in/

推荐答案

CakePHP应用程序中500 Internal Server Error可能有以下原因:

There can be following reasons for 500 Internal Server Error in CakePHP application:

  1. 您的 .htaccess 文件不正确.详情请见此处
  2. 文件夹的权限不正确.如果 CakePHP 应用程序是组可写的,即 777,则网络服务器会出于安全考虑给出 500 错误.
  3. 您缺少数据库连接.根据 Webhost 正确配置数据库,因为大多数情况下本地和生产服务器数据库具有不同的详细信息.
  4. 删除 tmp 文件夹的内容.如果您将应用程序从一处移动到另一处,最佳做法是必须删除缓存.
  5. 出于测试目的,调试应该像 Configure::write('debug',2);
  6. 如果没有成功,请检查您的 Apache 错误日志.如果使用 Linux /var/log/apache2/error.log
  1. Your .htaccess files are not correct. See Here for details
  2. Permissions of folders are not correct. If CakePHP app is Group Writable i.e. 777 then webserver gives 500 error for safety.
  3. You are missing Database Connection. Correct database configuration according to Webhost because most of times local and production server databases have different details.
  4. Delete the content of your tmp folder. It is best practice that you must delete cache if you move your application from one place to another.
  5. For testing purpose debug should be on like Configure::write('debug',2);
  6. If not succeeded check your Apache Error Log. If using Linux /var/log/apache2/error.log

希望能帮到你,谢谢!!

Hope It Helps, Thanks!!

这篇关于CakePHP 500 内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆