CakePHP 500内部服务器错误 [英] CakePHP 500 Internal Server Error
问题描述
我会收到以下错误
内部伺服器错误
Internal Server Error
服务器遇到内部错误或配置错误,并且无法完成您的请求
。
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个内部服务器错误错误,而
尝试使用ErrorDocument来处理请求。 / p>
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/
推荐答案
500内部服务器错误
在CakePHP应用程序中:
There can be following reasons for 500 Internal Server Error
in CakePHP application:
- 您的.htaccess文件不正确。 详情请参阅这里
- 文件夹的权限不正确。如果CakePHP应用程序是Group Writable,即
777
,则webserver会出现500
错误。 - 您缺少数据库连接。
- 删除
tmp
文件夹的内容。如果您将应用程序从一个位置移动到另一个位置,则最佳实践是必须删除缓存。 - 对于测试目的,调试应该像
Configure :: write 'debug',2);
- 如果不成功,请检查您的Apache错误日志。如果使用Linux
/var/log/apache2/error.log
- Your .htaccess files are not correct. See Here for details
- Permissions of folders are not correct. If CakePHP app is Group Writable i.e.
777
then webserver gives500
error for safety. - You are missing Database Connection. Correct database configuration according to Webhost because most of times local and production server databases have different details.
- 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. - For testing purpose debug should be on like
Configure::write('debug',2);
- If not succeeded check your Apache Error Log. If using Linux
/var/log/apache2/error.log
它帮助,谢谢!
这篇关于CakePHP 500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!