CakePHP显示500内部服务器错误

编程入门 行业动态 更新时间:2024-10-05 23:28:15
本文介绍了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/demo/ 但是,当我将其移至同一服务器根目录时,即mysite /显示错误。

For example, it was working fine on: mysite/demo/ But, when I move it into the same server root, i.e. mysite/ 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内部服务器错误

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

发布评论

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

>www.elefans.com

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