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

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

问题描述

我的CakePHP安装有问题。

I'm having a problem with my CakePHP installation.

我正在子文件夹中进行开发,并且工作正常。但是,当我将其移至根文件夹时,它显示500 Internal Server Error。

I was developing it in a subfolder and it was working fine. But, when I move it into the root folder, it's showing 500 Internal Server Error.

例如,它在以下位置运行良好:mysite.com/demo/
但是,当我将其移至同一服务器根目录时,即mysite.com /显示错误。

For example, it was working fine on: mysite.com/demo/ But, when I move it into the same server root, i.e. mysite.com/ it's showing the error.

CakePHP版本:2.2

CakePHP Version: 2.2

由于在/ demo /文件夹上运行良好,我认为mod_rewrite等

As it was working fine on /demo/ folder, I think the mod_rewrite etc. are working fine, so that confused what's happening with the root folder.

任何想法?

预先感谢。

推荐答案

请检查.htaccess文件并如果将RewriteBase / folder / subfolder更改为RewriteBase /

Please check .htaccess file and change if RewriteBase /folder/subfolder to RewriteBase /

如下所示

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase /
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

以及在调试模式下(\app\Config\core.php) Configure :: write('debug',2); 暂时清除缓存,然后关闭 Configure :: write('debug',0);

and also On the debug mode (\app\Config\core.php) Configure::write('debug',2); for clearing cache for a moment and then off Configure::write('debug',0);

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

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