2015-07-21 54 views
0

将Yii项目文件夹移动到cPanel文件管理器中的public_html时遇到了一些问题。在本地主机http://localhost:8888/eKehadiran/index.php它工作正常,但是当我将项目移动到public_html并运行ekehadiran.com/index.php时,出现错误。将Yii项目移动到cPanel时出现500内部服务器错误

这是对的public_html一些相关的文件:

的.htaccess

AddHandler application/x-httpd-php54 .php .php5 .php4 .php3

的index.php

<?php 
 

 
// change the following paths if necessary 
 
$yii=dirname(__FILE__).'/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();

回答

2

您在error_logs文件中遇到什么错误?请检查并尝试禁用.htaccess行。

+0

这是下面的路径还挺从日志文件中的错误: Application.cpp中的SoftException:603:目录“/ home/mrdidie/public_html”可由组写入# – mrdidie

+0

yeayyy!感谢您提供查看error_logs文件的建议。现在是工作。我更改了错误中给出的所有权限error_logs – mrdidie

+0

是的,如果您在服务器上使用suphp,则需要分别为文件夹和文件分配权限755和644 – 24x7servermanagement

0

尝试在index.php文件添加以下行

<?php 

error_reporting(-1); 
ini_set('display_errors', true); 

//改变,如果必要

它应该表现出你的错误