Php yii-上传到web主机时出现内部服务器错误(500)

Php yii-上传到web主机时出现内部服务器错误(500),php,.htaccess,yii,Php,.htaccess,Yii,昨天,我将我的yii项目网站上传到servobox webhosting my index.php <?php // change the following paths if necessary $yii=dirname(__FILE__).'/../hshome/paperchoicecomph/p/yii/framework/yii.php'; $config=dirname(__FILE__).'/protected/config/main.php'; // remov

昨天,我将我的yii项目网站上传到servobox webhosting

my index.php

    <?php

// change the following paths if necessary
$yii=dirname(__FILE__).'/../hshome/paperchoicecomph/p/yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

require_once($yii);
Yii::createWebApplication($config)->run();
在localhost中,它工作正常,但当我上传它时,它给我这个错误500-内部服务器错误。您正在查找的资源有问题,无法显示

有人能帮我纠正这个错误吗。我搜索了论坛并尝试了一些解决方案,但没有任何效果


请提供帮助:

您需要检查apache错误日志以获取准确的错误,在CentOS中,您可以通过SSH登录到服务器并执行以下命令来实时显示错误日志

tail-f/usr/local/apache/logs/error\u log

这可能是与文件权限相关的错误,默认情况下,后端和前端中的索引文件对组具有错误的写入权限

[Tue Oct 25 08:01:58.895038 2016] [:error] [pid ...] [client ...]
SoftException in Application.cpp:256: File ".../backend/web/index.php" 
is writeable by group
您只需将权限从664更改为644即可


确保在前端和后端索引文件中执行此操作。

您可以查看错误日志。。。!谢谢你的回复。yii application.log的错误日志未显示错误。我不知道为什么。上一个错误日志是6/28,但我昨天刚刚上传了我的项目。我想他想让你检查apache的错误日志。你检查了框架路径了吗?