2015-07-21 65 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); 

//改變,如果必要

它應該表現出你的錯誤

相關問題