CakePHP:基本設定 - ぷちWiki

最終更新日時:

概要



app/config/core.php で基本設定を行います。
以下、主な設定です。

デバッグ



必要があればデバッグレベルを変更します。

 Configure::write('debug', 1);

セキュリティ関連



ハッシュ生成の際に使用するセキュリティ文字列を変更します。

 Configure::write('Security.salt', 'xxxxx');

変更しないと以下のようなエラーが出ます。

 Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application ...

同様に以下も変更。

 Configure::write('Security.cipherSeed', 'xxxxx');

変更しないと以下のようなエラーが出ます。

 Notice (1024): Please change the value of ‘Security.cipherSeed’ in app/config/core.php to a numeric (digits only) seed value specific to your application

セキュリティのレベルを設定します。
デフォルトは medium に設定されていますが、特に不都合がなければ high でよいと思います。

 Configure::write('Security.level', 'high');