如何解决cakephp 500内部服务器错误?

编程入门 行业动态 更新时间:2024-10-26 16:31:57
本文介绍了如何解决cakephp 500内部服务器错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在本地计算机上使用Cakephp为客户端构建了一个微型应用程序,该计算机在Windows上[在htdocs中的 cake文件夹中)运行xampp。今天,我在客户端的实时服务器上创建了一个名为 cake的新文件夹,并将本地计算机上 cake文件夹的内容上传到了实时服务器上的 cake文件夹以进行测试。我使用以下网址启动了我的应用程序: kianaretail/cake ,我收到一个内部服务器错误500

I built a tiny application for a client using cakephp on my local machine running xampp over windows [in a folder "cake" inside htdocs]. Today i created a new folder on my client's live server named "cake" and uploaded the contents of "cake" folder on local machine to "cake" folder on live server for testing. I fired up my app using url: kianaretail/cake and I got an internal server error 500.

我经历了几个人,建议将RewriteBase添加到指向该位置的根目录,应用程序目录和webroot文件夹中的.htaccess文件中。在我的情况下,根目录为 RewriteBase / cake,应用程序为 RewriteBase / cake / app,而在webroot中为 RewriteBase / cake / app / webroot。但是它仍然无法正常工作。问题仍然存在。

I went through several people suggesting addition of RewriteBase to .htaccess files in root, app and webroot folders pointing to the location. In my case it was "RewriteBase /cake" in root, "RewriteBase /cake/app" in app and "RewriteBase /cake/app/webroot" in webroot. But it did not work still. The problem still persists.

同一应用程序在我的本地计算机上运行良好。

The same application runs fine on my local machine. Just messes up on live server.

请帮助。

推荐答案

如果应用程序在本地计算机上运行良好,但在实时服务器中存在问题,则还可以尝试调查服务器之间的哪些配置不同,以获取有关可能导致问题的提示。

if the application runs fine in the local machine but has problems in the live server, you could also try to investigate which configurations are different between the servers to try to get some hints as to what might be causing the problem.

我想实时服务器未启用mod_rewrite,因此使用RewriteBase进行.htaccess可能会造成麻烦。您可以尝试对.htaccess进行注释,看看它在服务器中是否运行良好,然后一次重新启用一个配置以尝试解决问题。

I would guess that the live server doesn't have mod_rewrite enabled, and so a .htaccess with RewriteBase could be causing the trouble. You can try to comment the .htaccess and see if it runs fine in the server and then re-enable the configurations one at a time to try to figure things out.

另外,正如Dave所说,检查错误日志可能还会为您提供更多信息。

Also, as Dave mentioned, checking the error logs would probably give you more information as well.

希望有帮助。

更多推荐

如何解决cakephp 500内部服务器错误?

本文发布于:2023-11-01 22:56:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550649.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何解决   错误   服务器   cakephp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!