web-dev-qa-db-ja.com

インストールエラー:app / config / core.phpの 'Security.salt'の値をアプリケーション固有のソルト値に変更してください

CakePHPをインストールしようとすると、saltとcipher seedの値の変更に関する次のエラーメッセージが表示されます。これらの値を変更するにはどうすればよいですか?

Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 684]
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\libs\debugger.php, line 688]
15
anuradha

あなたはそれが言うように行う必要があります:

  1. 編集yourInstallation*/app/config/core.php
  2. Security.saltを検索し、ランダムな文字をいくつか変更します(これは、アプリケーションに他の10億のインストールと同じセキュリティシードがないため、深刻なセキュリティの抜け穴になる可能性があるためです。
  3. Security.cipherSeedでも同じことを行いますが、数字のみを使用します
  4. 保存core.php

core.phpを読んでください。そうすることで多くのことを学ぶことができます。

54
Leo
  1. CakePHPのappフォルダーに移動します。

  2. 設定フォルダーに入り、core.phpを開きます

  3. あなたはこれらの行をどこかに見るでしょう:

    /**
     * A random string used in security hashing methods.
     */
    
    
    Configure::write('Security.salt', 'xxxxxxxxxxxxxxxxxxxxxxx');
    

    CakePHPのバージョンが1.3以降の場合、これもそこにあります:

    /**
     * A random numeric string (digits only) used to encrypt/decrypt strings.
     */
    
    
    Configure::write('Security.cipherSeed', 'xxxxxxxxxxxxxxxxxxxxxxx');
    

    次の値を変更するだけです。

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

    に:

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

    またはあなたの選択のいずれか。最初に、値全体を空白にすることもできます。

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

その後、ファイルを保存すれば完了です。

21
Tarun Upadhyay

クックブックのドキュメントをご覧ください- 11.1.4 Optional Configuration

2
Dave