LoginSignup
15
15

More than 5 years have passed since last update.

cakePHP2.4.7の初期設定

Last updated at Posted at 2014-04-10

ファイルの準備

cakePHP

公式からダウンロードしたファイルをサーバーにアップロード

Security.saltの設定

Notice (1024): Please change the value of 'Security.salt' in APP/Config/core.php to a salt value specific to your application. [CORE/Cake/Utility/Debugger.php, line 845]

設定:

/app/Config/core.php225行目
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

文字列を適当に変更する

Security.cipherSeedの設定

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. [CORE/Cake/Utility/Debugger.php, line 849]

設定:

/app/Config/core.php230行目
Configure::write('Security.cipherSeed', '76859309657453542496749683645');

乱数を適当に変更する

timezoneの設定

Warning: 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 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /var/www/vhosts/***/httpdocs/lib/Cake/Cache/CacheEngine.php on line 61 Warning: 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 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /var/www/vhosts/***/httpdocs/lib/Cake/Cache/CacheEngine.php on line 61

設定:

/lib/Cake/Cache/CacheEngine.php61行目
if (!is_numeric($this->settings['duration'])) {
    date_default_timezone_set('Asia/Tokyo');
    $this->settings['duration'] = strtotime($this->settings['duration']) - time();
}

timezone設定を追加

Databaseの設定

Warning (2): include_once(/var/www/vhosts/***/httpdocs/app/Config/database.php): failed to open stream: No such file or directory [CORE/Cake/Model/ConnectionManager.php, line 67]

/app/Config内にあるdatabase.php.defaultを複製してdatabase.phpに変更する

DebugKitの配置

DebugKit is not installed. It will help you inspect and debug different aspects of your application.
You can install it from GitHub

配置:

DebugKitからダウンロードしたdebug_kit-master/app/Pluginにアップロードして名前をDebugkitに変更

設定:

app/Config/bootstrap.php
CakePlugin::load('DebugKit');

プラグインの読み込み設定をする

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15