將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();
這是下面的路徑還挺從日誌文件中的錯誤: Application.cpp中的SoftException:603:目錄「/ home/mrdidie/public_html」可由組寫入# – mrdidie
yeayyy!感謝您提供查看error_logs文件的建議。現在是工作。我更改了錯誤中給出的所有權限error_logs – mrdidie
是的,如果您在服務器上使用suphp,則需要分別爲文件夾和文件分配權限755和644 – 24x7servermanagement