続・設定でハマったところ

CentOS環境。

Forbidden(403エラー)が出る

SELinuxの無効化

# vi /etc/selinux/config
SELINUX=disabled
# reboot

…しかし効果はなかった。

ホームディレクトリのアクセス権限をチェック

homeディレクトリの権限が700になっていた→755に修正

$sudo chmod 755 /home/hchuno

Not Found(404エラー)が出る

.htaccessのRewriteBaseのパス指定を修正
  • 以下の3箇所の.htaccessを修正
    • CakePHPのルートディレクトリ
    • /app
    • /app/webroot

Internal Server Error(500エラー)が出る

RewriteBase /

RewriteBase /cakephp

に修正

    • app/

RewriteBase /app

RewriteBase /cakephp/app

に修正

    • app/webroot

RewriteBase /app/webroot

RewriteBase /cakephp

に修正

Wariningが出る

  • 以下のようなメッセージ。

Warning (2): strtotime() http://php.net/function.strtotime: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead [CORE/cake/libs/cache.php, line 597]

$vi app/config/core.php

として、

date_default_timezone_set(’UTC’)

のコメントアウトを外す。