Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installation error: Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application

Tags:

php

cakephp

When trying to install CakePHP, I get the following error message about changing the values of the salt and cipher seed. How can I change these values?

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]
like image 660
anuradha Avatar asked Nov 12 '10 10:11

anuradha


3 Answers

You just need to do as it says:

  1. Edit yourInstallation*/app/config/core.php
  2. Search for Security.salt and change some random characters (this is so your application doesn't have the same security seed as a billion other installations, which would be a serious security loophole.
  3. Do the same with Security.cipherSeed but use only numbers
  4. Save core.php

Now read core.php - you'll learn a lot from doing that.

like image 72
Leo Avatar answered Nov 14 '22 15:11

Leo


  1. Go to your CakePHP app folder.

  2. Enter the config folder and open core.php

  3. You will see these lines somewhere:

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

    If your CakePHP version is 1.3 or greater then this will also be there:

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

    Just change the values in:

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

    to:

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

    or any of your choice. Just to start you can make whole value blank as well:

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

Then save the file, and you're done.

like image 39
Tarun Upadhyay Avatar answered Nov 14 '22 16:11

Tarun Upadhyay


See the cookbook docs - 11.1.4 Optional Configuration

like image 2
Dave Avatar answered Nov 14 '22 15:11

Dave